本文整理汇总了PHP中hoot_attr函数的典型用法代码示例。如果您正苦于以下问题:PHP hoot_attr函数的具体用法?PHP hoot_attr怎么用?PHP hoot_attr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hoot_attr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_template_part
?>
<?php
// Dispay Loop Meta at top
if (hoot_page_header_attop()) {
get_template_part('template-parts/loop-meta', 'shop');
// Loads the template-parts/loop-meta-shop.php template to display Title Area with Meta Info (of the loop)
}
// Template modification Hook
do_action('hoot_template_before_content_grid', 'single-product.php');
?>
<div class="grid">
<main <?php
hoot_attr('content');
?>
>
<?php
// Template modification Hook
do_action('hoot_template_main_start', 'single-product.php');
/**
* woocommerce_before_main_content hook
*
* removed @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
*/
do_action('woocommerce_before_main_content');
?>
示例2: hoot_attr
<footer <?php
hoot_attr('footer', '', 'footer grid-stretch highlight-typo');
?>
>
<div class="grid">
<?php
$columns = hoot_get_footer_columns();
$alphas = range('a', 'e');
$structure = hoot_footer_structure();
?>
<?php
for ($i = 0; $i < $columns; $i++) {
?>
<div class="<?php
echo 'grid-span-' . $structure[$i];
?>
footer-column">
<?php
dynamic_sidebar('footer-' . $alphas[$i]);
?>
</div>
<?php
}
?>
</div>
</footer><!-- #footer -->
示例3: _e
<?php
if (has_nav_menu('primary')) {
// Check if there's a menu assigned to the 'primary' location.
?>
<h3 class="screen-reader-text"><?php
_e('Primary Navigation Menu', 'responsive-brix');
?>
</h3>
<nav <?php
hoot_attr('menu', 'primary');
?>
>
<div class="menu-toggle"><?php
_e('Menu', 'responsive-brix');
?>
<i class="fa fa-bars"></i></div>
<?php
/* Create Menu Args Array */
$menu_args = array('theme_location' => 'primary', 'container' => false, 'menu_id' => 'menu-primary-items', 'menu_class' => 'menu-items sf-menu', 'fallback_cb' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>');
/* Display Main Menu */
wp_nav_menu($menu_args);
?>
</nav><!-- #menu-primary -->
<?php
}
// End check for menu.
示例4: hoot_attr
<footer <?php
hoot_attr('footer', '', 'footer grid-stretch');
?>
>
<div class="grid">
<?php
$columns = hoot_get_footer_columns();
$alphas = range('a', 'e');
$structure = hoot_footer_structure();
?>
<?php
for ($i = 0; $i < $columns; $i++) {
?>
<div class="<?php
echo 'grid-span-' . $structure[$i];
?>
footer-column">
<?php
dynamic_sidebar('footer-' . $alphas[$i]);
?>
</div>
<?php
}
?>
</div>
</footer><!-- #footer -->
示例5: _e
if (is_sticky()) {
?>
<div class="entry-sticky-tag contrast-typo"><?php
_e('Sticky', 'responsive-brix');
?>
</div>
<?php
}
?>
<?php
hoot_meta_info_blocks(hoot_get_option('archive_post_meta'));
?>
<div <?php
hoot_attr('entry-summary');
?>
>
<?php
if ('full-content' == hoot_get_option('archive_post_content')) {
the_content();
} else {
the_excerpt();
}
?>
</div><!-- .entry-summary -->
</div><!-- .entry-grid-content -->
</div><!-- .entry-grid -->
示例6: hoot_attr
<?php
if (apply_filters('woocommerce_show_page_title', true)) {
?>
<h1 <?php
hoot_attr('loop-title');
?>
><?php
woocommerce_page_title();
?>
</h1>
<?php
}
?>
<div <?php
hoot_attr('loop-description');
?>
>
<?php
do_action('woocommerce_archive_description');
?>
</div><!-- .loop-description -->
</div><!-- .loop-meta -->
</div>
</div>
</div>
<?php
// Let child themes add content if they want to
示例7: hoot_main_layout
<?php
// Dispay Sidebar if not a one-column layout
$sidebar_size = hoot_main_layout('primary-sidebar');
if (!empty($sidebar_size)) {
?>
<aside <?php
hoot_attr('sidebar', 'primary');
?>
>
<?php
// Template modification Hook
do_action('hoot_template_sidebar_start', 'shop');
if (is_active_sidebar('woocommerce-sidebar')) {
// If the sidebar has widgets.
dynamic_sidebar('woocommerce-sidebar');
// Displays the woocommerce sidebar.
} else {
// If the sidebar has no widgets.
the_widget('WP_Widget_Text', array('title' => __('Woocommerce Sidebar', 'chromatic'), 'text' => sprintf(__('Woocommerce pages have a separate sidebar than the rest of your site. You can add custom widgets from the %swidgets screen%s in the admin.', 'chromatic'), current_user_can('edit_theme_options') ? '<a href="' . admin_url('widgets.php') . '">' : '', current_user_can('edit_theme_options') ? '</a>' : ''), 'filter' => true), array('before_widget' => '<section class="widget widget_text">', 'after_widget' => '</section>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
}
// End widgets check.
// Template modification Hook
do_action('hoot_template_sidebar_start', 'shop');
?>
</aside><!-- #sidebar-primary -->
<?php
示例8: get_header
get_header();
// Template structure
$wt_sidebar = apply_filters('widgetized_template_sidebar', 'none');
$wt_content_context = $wt_sidebar == 'none' ? 'none' : '';
$wt_content_grid = $wt_sidebar == 'none' ? 'grid-stretch' : 'grid';
// Template modification Hook
do_action('hoot_template_before_content_grid', 'template-widgetized.php');
?>
<div class="<?php
echo $wt_content_grid;
?>
">
<main <?php
hoot_attr('page-template-content', $wt_content_context);
?>
>
<?php
// Template modification Hook
do_action('hoot_template_main_start', 'template-widgetized.php');
// Get Sections List
$sections = hoot_sortlist(hoot_get_mod('widgetized_template_sections'));
// Display Each Section according to ther sort order.
if (is_array($sections) && !empty($sections)) {
foreach ($sections as $key => $section) {
if (empty($section['sortitem_hide'])) {
$key = apply_filters('widgetized_template_sections_switch', $key);
$section['columns'] = isset($section['columns']) ? $section['columns'] : '100';
switch ($key) {
示例9: wp_kses_post
<div class="hootslider-html-slide-content linkstyle">
<?php
echo wp_kses_post(wpautop($slide['content']));
?>
</div>
<?php
}
?>
<?php
if (!empty($slide['url'])) {
?>
<div class="hootslider-html-slide-link"><a href="<?php
echo esc_url($slide['url']);
?>
" <?php
hoot_attr('hootslider-html-slide-button', 'html-slider', 'button');
?>
><?php
echo $slide['button'];
?>
</a></div>
<?php
}
?>
</div>
<?php
}
?>
<?php
if (!empty($slide['image'])) {
示例10: get_header
<?php
/*
Template Name: Widgetized Template
*/
get_header();
// Loads the header.php template.
?>
<main <?php
hoot_attr('page_template_content');
?>
>
<?php
// Get Sections List
$sections = hoot_get_option('widgetized_template_sections');
$sortlist = hoot_map_sortlist($sections);
extract($sortlist, EXTR_PREFIX_ALL, 'sections');
// Get Highlight
$area_highlight = hoot_get_option('widgetized_highlight_template_area');
// Display Each Section according to ther sort order.
foreach ($sections_order as $key => $order) {
if (!empty($sections_display[$key])) {
$highlight_class = is_array($area_highlight) && !empty($area_highlight[$key]) ? 'area-highlight' : '';
switch ($key) {
// Display Widget Area A/B/C
case 'area_a':
case 'area_b':
case 'area_c':
if (!is_active_sidebar('widgetized-template-' . $key)) {
示例11: esc_html
?>
<h6 class="invert-typo hootslider-image-slide-caption"><?php
echo esc_html($slide['caption']);
?>
</h6>
<?php
}
?>
<?php
if (!empty($slide['url']) && !empty($slide['button'])) {
?>
<a href="<?php
echo esc_url($slide['url']);
?>
" <?php
hoot_attr('hootslider-image-slide-button', 'image-slider', 'button');
?>
><?php
echo esc_html($slide['button']);
?>
</a>
<?php
}
?>
</div>
</li><?php
}
}
?>
</ul>
示例12: hoot_meta_info_blocks
/**
* Display the meta information HTML for single post/page
*
* @since 1.0
* @access public
* @param array $display information to display
* @return void
*/
function hoot_meta_info_blocks($display = array())
{
$default_display = array('author' => true, 'date' => true, 'cats' => true, 'tags' => true, 'comments' => true);
$display = wp_parse_args($display, $default_display);
if (is_page()) {
$display['cats'] = $display['tags'] = false;
}
$skip = true;
foreach ($display as $check) {
$skip = $check ? false : $skip;
}
if ($skip) {
return;
}
?>
<div class="entry-byline">
<?php
if (!empty($display['author'])) {
?>
<div class="entry-byline-block entry-byline-author">
<span class="entry-byline-label"><?php
_e('By:', 'responsive-brix');
?>
</span>
<span <?php
hoot_attr('entry-author');
?>
><?php
the_author_posts_link();
?>
</span>
</div><?php
}
if (!empty($display['date'])) {
?>
<div class="entry-byline-block entry-byline-date">
<span class="entry-byline-label"><?php
_e('On:', 'responsive-brix');
?>
</span>
<time <?php
hoot_attr('entry-published');
?>
><?php
echo get_the_date();
?>
</time>
</div><?php
}
if (!empty($display['cats'])) {
$category_list = get_the_category_list(', ');
if (!empty($category_list)) {
?>
<div class="entry-byline-block entry-byline-cats">
<span class="entry-byline-label"><?php
_e('In:', 'responsive-brix');
?>
</span>
<?php
echo $category_list;
?>
</div><?php
}
}
if (!empty($display['tags']) && get_the_tags()) {
?>
<div class="entry-byline-block entry-byline-tags">
<span class="entry-byline-label"><?php
_e('Tagged:', 'responsive-brix');
?>
</span>
<?php
!get_the_tags() ? _e('No Tags', 'responsive-brix') : the_tags('', ', ', '');
?>
</div><?php
}
if (!empty($display['comments']) && comments_open()) {
?>
<div class="entry-byline-block entry-byline-comments">
<span class="entry-byline-label"><?php
_e('With:', 'responsive-brix');
?>
</span>
<?php
comments_popup_link(__('0 Comments', 'responsive-brix'), __('1 Comment', 'responsive-brix'), __('% Comments', 'responsive-brix'), 'comments-link', '');
?>
</div><?php
}
if ($edit_link = get_edit_post_link()) {
?>
//.........这里部分代码省略.........
示例13: the_content
?>
>
<?php
if ('full-content' == hoot_get_option('archive_post_content')) {
the_content();
} else {
the_excerpt();
}
echo do_shortcode('[ssba]');
?>
</div><!-- .entry-summary -->
<!-- <div <?php
hoot_attr('bottom-blog');
?>
> -->
<div <?php
hoot_attr('entry-time-auth');
?>
>
<?php
mb_entry_date_auth();
?>
</div>
<!-- </div> -->
</div><!-- .entry-grid-content -->
</div><!-- .entry-grid -->
</article><!-- .entry -->
示例14: esc_attr
echo 'social-icons-' . esc_attr($size);
?>
"><?php
foreach ($icons as $key => $icon) {
if (!empty($icon['url']) && !empty($icon['icon'])) {
$icon_class = sanitize_html_class($icon['icon']) . '-block';
if ($icon['icon'] == 'fa-envelope') {
$url = str_replace(array('http://', 'https://'), '', esc_url($icon['url']));
$url = 'mailto:' . $url;
$context = 'email';
} else {
$url = esc_url($icon['url']);
$context = 'link';
}
?>
<a href="<?php
echo $url;
?>
" <?php
hoot_attr('social-icons-icon', $context, $icon_class);
?>
>
<i class="fa <?php
echo sanitize_html_class($icon['icon']);
?>
"></i>
</a><?php
}
}
?>
</div>
示例15: apply_filters
?>
</h1>
</header><!-- .entry-header -->
<?php
if (hoot_get_mod('post_featured_image') && !hoot_is_404()) {
$img_size = apply_filters('hoot_post_image_page', '');
hoot_post_thumbnail('entry-content-featured-img', $img_size);
}
?>
<?php
$entry_content_class = hoot_is_404() ? 'no-shadow' : '';
?>
<div <?php
hoot_attr('entry-content', '', $entry_content_class);
?>
>
<div class="entry-the-content">
<?php
the_content();
?>
</div>
<?php
wp_link_pages();
?>
</div><!-- .entry-content -->
<div class="screen-reader-text" itemprop="datePublished" itemtype="https://schema.org/Date"><?php