本文整理汇总了PHP中hybrid_attr函数的典型用法代码示例。如果您正苦于以下问题:PHP hybrid_attr函数的具体用法?PHP hybrid_attr怎么用?PHP hybrid_attr使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hybrid_attr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hybrid_attr
<div class="entry-summary" <?php
hybrid_attr('entry-summary');
?>
>
<?php
the_excerpt();
?>
</div>
<?php
} else {
?>
<div class="entry-content" <?php
hybrid_attr('entry-content');
?>
>
<?php
/* translators: %s: Name of current post */
the_content(sprintf(__('Read more %s', 'chuchadon'), the_title('<span class="screen-reader-text">', '</span>', false)));
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'chuchadon'), 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '<span class="screen-reader-text">' . __('Page', 'chuchadon') . ' </span>%', 'separator' => '<span class="screen-reader-text">,</span> '));
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
chuchadon_post_terms(array('taxonomy' => 'post_tag', 'sep' => '', 'text' => __('<span class="screen-reader-text">Tagged</span> %s', 'chuchadon')));
?>
</footer><!-- .entry-footer -->
示例2: kt_user_reviews_list_callback
/**
* User comment list custom callback function.
*
* @since 0.1.0
*/
function kt_user_reviews_list_callback($comment, $args, $depth)
{
$post_id = $comment->comment_post_ID;
//$user_id = $args->user_id;
$post_obj = get_post($post_id);
$permalink = get_permalink($post_id);
$post_thumbnail = get_the_post_thumbnail($post_id, 'medium');
if ($post_obj->post_type == 'shop') {
$business_category = get_the_terms($post_id, 'shop_category');
} else {
if ($post_obj->post_type == 'tour') {
$business_category = get_the_terms($post_id, 'tour_category');
}
}
$location_category = get_the_terms($post_id, 'location_category');
$kt_shop_ppp = get_post_meta($post_id, '_kt_shop_ppp', TRUE);
$kt_shop_rating = get_post_meta($post_id, '_kt_rating', TRUE);
?>
<li <?php
hybrid_attr('comment');
?>
>
<article <?php
hybrid_attr('list');
?>
>
<section class="info-container clear-fix">
<div class="list-thumbnail">
<a href=" <?php
echo $permalink;
?>
">
<figure>
<?php
echo $post_thumbnail;
?>
</figure>
</a>
</div><!-- .list-thumbnail -->
<div class="list-info">
<header class="list-header">
<?php
kt_title(FALSE, '<h5 class="list-title"><a href="' . $permalink . '">', '</a></h5>', $post_id);
?>
</header>
<ul>
<?php
if (!empty($kt_shop_ppp)) {
?>
<li> <?php
echo $kt_shop_ppp;
?>
RMB </li>
<?php
}
?>
</ul>
<ul>
<?php
foreach ($business_category as $item) {
?>
<li> <?php
echo $item->name;
?>
</li>
<?php
}
?>
</ul>
<?php
if (!empty($location_category)) {
?>
<ul>
<?php
foreach ($location_category as $item) {
?>
<li> <?php
echo $item->name;
?>
</li>
<?php
}
?>
</ul>
<?php
}
?>
</div><!-- .list-info -->
</section><!-- .info-container -->
<div <?php
hybrid_attr('comment-content');
?>
//.........这里部分代码省略.........
示例3: tha_header_before
tha_header_before();
?>
<header <?php
hybrid_attr('header');
?>
>
<div class="wrap">
<?php
tha_header_top();
?>
<div <?php
hybrid_attr('branding');
?>
>
<?php
hybrid_site_title();
?>
<?php
hybrid_site_description();
?>
</div><!-- #branding -->
<?php
hybrid_get_sidebar('header-right');
?>
<?php
示例4: hybrid_attr
>
<header class="comment-meta">
<cite <?php
hybrid_attr('comment-author');
?>
><?php
comment_author_link();
?>
</cite><br />
<time <?php
hybrid_attr('comment-published');
?>
><?php
printf(__('%s ago', 'socially-awkward'), human_time_diff(get_comment_time('U'), current_time('timestamp')));
?>
</time>
<a <?php
hybrid_attr('comment-permalink');
?>
><?php
_e('Permalink', 'socially-awkward');
?>
</a>
<?php
edit_comment_link();
?>
</header><!-- .comment-meta -->
<?php
/* No closing </li> is needed. WordPress will know where to add it. */
示例5: the_content
<?php
the_content();
?>
</div>
<?php
if (!get_option('show_avatars')) {
// If avatars are not enabled.
?>
<footer class="entry-footer">
<?php
hybrid_post_format_link();
?>
<time <?php
hybrid_attr('entry-published');
?>
><?php
echo get_the_date();
?>
</time>
<a class="entry-permalink" href="<?php
the_permalink();
?>
" rel="bookmark" itemprop="url"><?php
_e('Permalink', 'infusion');
?>
</a>
<?php
comments_popup_link(number_format_i18n(0), number_format_i18n(1), '%', 'comments-link', '');
?>
示例6: hybrid_attr
<?php
if (has_nav_menu('primary')) {
// Check if there's a menu assigned to the 'primary' location.
?>
<nav class="nav offcanvas" <?php
hybrid_attr('menu', 'primary');
?>
>
<button class="open-button" data-action="toggle-menu"><?php
esc_html_e('Open Primary Menu', 'the-one');
?>
</button>
<div class="wrap">
<?php
do_action('theone_menu_primary_top');
?>
<?php
wp_nav_menu(array('theme_location' => 'primary', 'container' => '', 'menu_id' => 'menu-primary-items', 'menu_class' => 'menu-items', 'fallback_cb' => '', 'items_wrap' => '<ul id="%s" class="%s">%s</ul>'));
?>
<?php
do_action('theone_menu_primary_bottom');
?>
</div><!-- .wrap -->
示例7: hybrid_attr
<?php
if (has_nav_menu('social')) {
// Check if there's a menu assigned to the 'social' location.
?>
<nav <?php
hybrid_attr('menu', 'social');
?>
>
<?php
wp_nav_menu(array('theme_location' => 'social', 'depth' => 1, 'container' => 'div', 'container_class' => 'wrap', 'menu_id' => 'menu-primary-items', 'menu_class' => 'menu-items', 'fallback_cb' => '', 'items_wrap' => '<ul id="%s" class="%s">%s</ul>'));
?>
</nav><!-- #menu-social -->
<?php
}
// End check for menu.
示例8: wp_list_categories
if (is_taxonomy_hierarchical(get_queried_object()->taxonomy)) {
// If the taxonomy is hierarchical.
?>
<?php
$terms = wp_list_categories(array('taxonomy' => get_queried_object()->taxonomy, 'child_of' => get_queried_object_id(), 'depth' => 1, 'title_li' => false, 'show_option_none' => false, 'echo' => false));
?>
<?php
if (!empty($terms)) {
// If a list of child categories/terms was found.
?>
<nav <?php
hybrid_attr('menu', 'sub-terms');
?>
>
<ul id="menu-sub-terms-items" class="menu-items">
<?php
echo $terms;
?>
</ul><!-- .sub-terms -->
</nav><!-- .menu -->
<?php
}
// End check for list.
?>
示例9: _e
<div class="skip-link">
<a href="#content" class="screen-reader-text"><?php
_e('Skip to content', 'stargazer');
?>
</a>
</div><!-- .skip-link -->
<?php
hybrid_get_menu('primary');
// Loads the menu/primary.php template.
?>
<div class="wrap">
<header <?php
hybrid_attr('header');
?>
>
<?php
if (display_header_text()) {
// If user chooses to display header text.
?>
<div id="branding">
<?php
hybrid_site_title();
?>
<?php
hybrid_site_description();
?>
示例10: hybrid_attr
<?php
/**
* Front Page Sidebar.
*
* @package Toivo Lite
*/
?>
<?php
if (is_active_sidebar('front-page')) {
?>
<aside id="sidebar-front-page" class="sidebar-front-page sidebar" role="complementary" aria-labelledby="sidebar-front-page-header" <?php
hybrid_attr('sidebar', 'front-page');
?>
>
<h2 class="screen-reader-text" id="sidebar-front-page-header"><?php
echo esc_attr_x('Front Page Sidebar', 'Sidebar aria label', 'toivo-lite');
?>
</h2>
<div class="wrap">
<div class="wrap-inside">
<?php
dynamic_sidebar('front-page');
?>
</div><!-- .wrap-inside -->
</div><!-- .div -->
示例11: get_header
<?php
@header('HTTP/1.1 404 Not found', true, 404);
get_header();
// Loads the header.php template.
?>
<main <?php
hybrid_attr('error');
?>
>
<h1 class="error-404-title entry-title"><?php
_e('404 Error: Page Not Found', 'infusion');
?>
</h1>
<div class="entry-content">
<p><?php
printf(__('You tried going to %1$s, and it cannot be found. Sorry!', 'infusion'), '<code>' . site_url(esc_url($_SERVER['REQUEST_URI'])) . '</code>');
?>
</p>
<p>There could be a few different reasons for this:</p>
<ul>
<li>The page was moved.</li>
<li>The page no longer exists.</li>
<li>The URL is slightly incorrect.</li>
</ul>
示例12: hybrid_attr
/**
* Header Sidebar in Top of the page.
*
* @package Chuchadon
*/
?>
<?php
if (is_active_sidebar('header')) {
?>
<div id="sidebar-header-wrapper" class="sidebar-header-wrapper">
<aside id="sidebar-header" class="sidebar-header sidebar-header-subsidiary sidebar" role="complementary" aria-labelledby="sidebar-header-header" <?php
hybrid_attr('sidebar', 'header');
?>
>
<h2 class="screen-reader-text" id="sidebar-header-header"><?php
echo esc_attr_x('Header Sidebar', 'Sidebar aria label', 'chuchadon');
?>
</h2>
<div class="wrap">
<div class="wrap-inside">
<?php
dynamic_sidebar('header');
?>
</div><!-- .wrap-inside -->
示例13: get_header
<?php
/**
* The template for front page
*
* @package iKoreaTown
* @since 0.1.1
*/
get_header();
?>
<main <?php
hybrid_attr('page');
?>
>
<?php
$cdn_addr = 'https://ikoreatown-bucket.oss-cn-qingdao.aliyuncs.com/assets';
?>
<div class="slide">
<ul>
<li>
<a href="https://www.ikoreatown.net/shop/%EC%9D%B4%EB%94%B0%EB%B0%94-%E6%A2%85%E5%B1%8B/">
<img src="<?php
echo $cdn_addr . '/img/slideshow1.jpg';
?>
" alt="이따바">
</a>
</li>
</ul>
</div>
示例14: hybrid_attr
<?php
if (is_active_sidebar('subsidiary')) {
// If the sidebar has widgets.
?>
<aside <?php
hybrid_attr('sidebar', 'subsidiary');
?>
>
<?php
dynamic_sidebar('subsidiary');
// Displays the subsidiary sidebar.
?>
</aside><!-- #sidebar-subsidiary -->
<?php
}
// End widgets check.
示例15: widget
/**
* Outputs the content for the current widget instance.
*/
public function widget($args, $instance)
{
/**
* Combine $instance data with defaults
* Then extract variables of this array
*/
extract(wp_parse_args($instance, array('title' => '', 'image_id' => '', 'icon' => '', 'text' => '', 'link_text' => '')));
/* Run $text through filter */
$text = apply_filters('widget_text', $text, $instance, $this);
/* Get archive of knowledgebase */
$url = get_post_type_archive_link(EJO_Knowledgebase::$post_type);
?>
<?php
echo $args['before_widget'];
?>
<?php
if (!empty($image_id)) {
// Check if there is an image_id
?>
<div class="featured-image-container">
<?php
echo wp_get_attachment_image($image_id, 'featured', false, array('class' => 'featured-image'));
?>
</div>
<?php
if (!empty($icon)) {
// Check if there is an icon
?>
<div class="icon-container">
<i class="fa fa-<?php
echo $icon;
?>
"></i>
</div>
<?php
}
// END icon check
?>
<?php
}
// END image_id check
?>
<?php
echo $args['before_title'];
?>
<a href="<?php
echo $url;
?>
"><?php
echo $title;
?>
</a><?php
echo $args['after_title'];
?>
<div class="textwidget">
<?php
echo wpautop($text);
?>
</div>
<?php
/* Get knowledgebase categories */
$categories = get_terms('knowledgebase_category', array('orderby' => 'term_order', 'order' => 'ASC'));
?>
<div class="knowledgebase-categories">
<?php
foreach ($categories as $category) {
// Loop through each knowledgebase category
?>
<?php
/* Get Knowledgebase ategory url */
$category_url = esc_url(get_term_link($category));
/* Fabricate knowledgebase category link */
$category_link = sprintf('<a href="%s" alt="%s">%s</a>', $category_url, esc_attr(sprintf('View all posts in %s', $category->name)), esc_html($category->name));
?>
<h4 <?php
hybrid_attr('category-title');
?>
><a href="<?php
echo esc_url(get_category_link($category->term_id));
?>
" title="<?php
echo esc_attr('Bekijk alle ' . $category->name . ' artikelen');
?>
//.........这里部分代码省略.........