本文整理汇总了PHP中get_the_archive_description函数的典型用法代码示例。如果您正苦于以下问题:PHP get_the_archive_description函数的具体用法?PHP get_the_archive_description怎么用?PHP get_the_archive_description使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_the_archive_description函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: archive_content_header
/**
* アーカイブページのコンテンツヘッダーを表示
*/
function archive_content_header($is_print = false)
{
$title = archive_title();
//get_the_archive_description()は<p>でラップされているので、取り除く
$desc = \is_home() ? \get_bloginfo('description') : \get_the_archive_description();
$description = \esc_html(\strip_tags($desc));
$count = \esc_html($GLOBALS['wp_query']->found_posts);
$attr = $count ? "" : " hidden";
$html = <<<EOD
<header class="header">
\t<h1><span>{$title}</span></h1>
\t<div class="description">{$description}</div>
\t<div class="count"{$attr}><span class="post-count">{$count}</span>件の記事</div>
</header>
EOD;
if ($is_print) {
echo $html;
return true;
} else {
return $html;
}
}
开发者ID:Aquei,项目名称:purely,代码行数:26,代码来源:archive_content_header.php
示例2: hybrid_get_loop_description
/**
* Gets the loop description. This function should only be used on archive-type pages, such as archive, blog, and
* search results pages. It outputs the description of the page.
*
* @link http://core.trac.wordpress.org/ticket/21995
* @since 2.0.0
* @deprecated 3.0.0
* @access public
* @return string
*/
function hybrid_get_loop_description()
{
_deprecated_function(__FUNCTION__, '3.0.0', 'get_the_archive_description()');
return get_the_archive_description();
}
开发者ID:KL-Kim,项目名称:my-theme,代码行数:15,代码来源:functions-deprecated.php
示例3: meta_description
/**
* add meta_description
*
* hook after post has loaded to add a unique meta-description
*
*/
public static function meta_description()
{
$post = new \TimberPost();
// check for custom field
$description = wptexturize($post->get_field('meta_description'));
if (is_tax()) {
if ($temp = term_description(get_queried_object(), get_query_var('taxonomy'))) {
$description = $temp;
}
} elseif (is_post_type_archive()) {
if ($temp = get_the_archive_description()) {
$description = $temp;
}
}
// else use preview
if (empty($description)) {
$description = str_replace('', "'", $post->get_preview(40, true, false, true));
}
// finally use the blog description
if (empty($description)) {
$description = get_bloginfo('description', 'raw');
}
$description = esc_attr(wp_strip_all_tags($description));
// limit to SEO recommended length
if (strlen($description) > 155) {
$description = substr($description, 0, 155);
$description = \TimberHelper::trim_words($description, str_word_count($description) - 1);
}
return $description;
}
开发者ID:benedict-w,项目名称:pressgang,代码行数:36,代码来源:site.php
示例4: the_archive_description
/**
* Display category, tag, or term description.
*
* @since 4.1.0
*
* @see get_the_archive_description()
*
* @param string $before Optional. Content to prepend to the description. Default empty.
* @param string $after Optional. Content to append to the description. Default empty.
*/
function the_archive_description($before = '', $after = '')
{
$description = get_the_archive_description();
if ($description) {
echo $before . $description . $after;
}
}
开发者ID:jenoya,项目名称:final,代码行数:17,代码来源:general-template.php
示例5: elseif
?>
</h1>
<div class="divider-small"></div>
<?php
} elseif (is_tax()) {
?>
<h1 class="archive-title"><?php
single_term_title();
?>
</h1>
<?php
$description = get_the_archive_description();
if ($description) {
echo '<div class="keynote">' . $description . '</div>';
} else {
echo '<div class="divider-small"></div>';
}
?>
<?php
} elseif (is_author()) {
?>
<?php
$curauth = isset($_GET['author_name']) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
?>
开发者ID:dqishmirian,项目名称:jrrny,代码行数:30,代码来源:titles.php
示例6: elseif
} elseif (is_tax('post_format', 'post-format-link')) {
_e('Links', 'some-like-it-neat');
} elseif (is_tax()) {
+single_term_title();
} else {
_e('Archives', 'some-like-it-neat');
}
/*
* END TO-DO
*/
?>
</h1>
<?php
// Show an optional term description.
if (function_exists('get_the_archive_description')) {
echo '<div class="taxonomy-description">' . get_the_archive_description() . '</div>';
/*
* TO-DO Might remove this code block at some point, since
* get_the_archive_description() does the same thing
* the below code does
*/
} elseif ($term_description = term_description()) {
printf('<div class="taxonomy-description">%s</div>', $term_description);
}
?>
</header><!-- .page-header -->
<?php
/* Start the Loop */
?>
<?php
开发者ID:joseph-jalbert,项目名称:AJ-wordpress-theme,代码行数:31,代码来源:archive.php
示例7: hybrid_attr
<header <?php
hybrid_attr('archive-header');
?>
>
<h1 <?php
hybrid_attr('archive-title');
?>
><?php
the_archive_title();
?>
</h1>
<?php
if (!is_paged() && ($desc = get_the_archive_description())) {
// Check if we're on page/1.
?>
<div <?php
hybrid_attr('archive-description');
?>
>
<?php
echo $desc;
?>
</div><!-- .archive-description -->
<?php
}
// End paged check.
?>
开发者ID:dartokloning,项目名称:hybrid-base,代码行数:31,代码来源:archive-header.php
示例8: buildArchiveCard
/**
* Build a card for an archive view
*
* @since 1.0.0
*
* @return \Twitter\Cards\Card|null Twitter Card object or null if minimum requirements not met
*/
public static function buildArchiveCard()
{
$query_type = 'archive';
$card = static::getCardObject($query_type);
if (!$card) {
return;
}
// WP 4.1+ functions
if (function_exists('get_the_archive_title')) {
/** This filter is documented in ::buildHomepageCard */
$title = apply_filters('twitter_card_title', get_the_archive_title(), $query_type, null);
if ($title) {
$card->setTitle(\Twitter\WordPress\Cards\Sanitize::sanitizePlainTextString($title));
}
unset($title);
}
if (method_exists($card, 'setDescription') && function_exists('get_the_archive_description')) {
/** This filter is documented in ::buildHomepageCard */
$description = apply_filters('twitter_card_description', get_the_archive_description(), $query_type, null);
if ($description) {
$card->setDescription(\Twitter\WordPress\Cards\Sanitize::sanitizeDescription($description));
}
unset($description);
}
return $card;
}
开发者ID:kasuparu,项目名称:wp-timecraft,代码行数:33,代码来源:Generator.php
示例9: get_the_tags
$markup .= '</ul>';
$posttags = get_the_tags();
if ($posttags) {
$markup .= '<ul class="entry-tags">';
foreach ($posttags as $tag) {
$markup .= '<li><a href="' . get_tag_link($tag->term_id) . '">#' . $tag->name . '</a></li>';
}
$markup .= '</ul>';
}
}
echo $markup;
} else {
if (is_archive()) {
$markup = '<h1 class="cover__title">' . get_the_archive_title() . '</h1>';
if (get_the_archive_description()) {
$markup .= '<p class="cover__text">' . get_the_archive_description() . '</p>';
}
} elseif (is_404()) {
$markup = '<h1 class="cover__title">' . esc_html('Oops! You went too far!', 'eduardodomingos') . '</h1>';
$markup .= '<p class="cover__text">' . esc_html('Houston we have a problem! That page can’t be found.', 'eduardodomingos') . '</p>';
} else {
$markup = '<h1 class="cover__title">' . single_post_title('', false) . '</h1>';
if (is_home()) {
// ACF needs to specify the Blog page ID in the get_field function.
$slug = get_page_by_path('blog');
if (get_field('cover_text', $slug->ID)) {
$markup .= '<p class="cover__text">' . get_field('cover_text', $slug->ID) . '</p>';
}
} else {
if (get_field('cover_text')) {
$markup .= '<p class="cover__text">' . get_field('cover_text') . '</p>';
开发者ID:eduardodomingos,项目名称:eduardodomingos.com,代码行数:31,代码来源:content-cover.php
示例10: alpha_archive_description
/**
* Output the archive description.
*
* @since 1.0.0
* @access public
* @return void
*/
function alpha_archive_description()
{
if (!is_paged() && ($desc = get_the_archive_description())) {
printf('<div %s>%s</div><!-- .archive-description -->', alpha_get_attr('archive-description'), $desc);
}
}
开发者ID:macrodreams,项目名称:alpha,代码行数:13,代码来源:hooked-archive.php
示例11: sketch_portfolio_content
/**
* Portfolio Content.
*/
function sketch_portfolio_content($before = '', $after = '')
{
$jetpack_portfolio_content = get_option('jetpack_portfolio_content');
if (is_tax() && get_the_archive_description()) {
echo $before . get_the_archive_description() . $after;
} else {
if (isset($jetpack_portfolio_content) && '' != $jetpack_portfolio_content) {
$content = convert_chars(convert_smilies(wptexturize(stripslashes(wp_filter_post_kses(addslashes($jetpack_portfolio_content))))));
echo $before . $content . $after;
}
}
}
开发者ID:mfojtik,项目名称:elisinwonderland,代码行数:15,代码来源:jetpack.php
示例12: loadArchiveTemplate
protected function loadArchiveTemplate(&$templates, &$context)
{
$post_types = array_filter((array) get_query_var('post_type'));
if (count($post_types) == 1) {
$post_type = reset($post_types);
$templates[] = "archive-{$post_type}.twig";
}
$templates[] = 'archive.twig';
$context['title'] = get_the_archive_title();
$context['description'] = get_the_archive_description();
}
开发者ID:crockett95,项目名称:jaydentontheme2,代码行数:11,代码来源:Templates.php
示例13: get_the_archive_description
<?php
/**
* Generates subtitle
* @requires $subtitle
*/
$item_string .= '<div class="component-element sub-title"><h4 class="archive-description sub-title-header">';
$item_string .= get_the_archive_description();
$item_string .= '</h4></div>';
开发者ID:TheSaladFace,项目名称:Naked,代码行数:9,代码来源:description-string.php
示例14: get_the_archive_title
}
?>
<?php
}
?>
<?php
if (is_archive()) {
?>
<h1 class="archive_title">
<?php
echo get_the_archive_title();
?>
</h1>
<p>
<?php
echo get_the_archive_description();
?>
</p>
<?php
}
?>
<div class="googlemaps">
<div class="googlemaps-buttons">
<div class="btn-group">
<a href="#googlemaps-posts" class="btn btn-default googlemap-show-list">
<?php
_e('show list', 'dimme-jour');
?>
</a>
<a href="#googlemaps-map" class="btn btn-default googlemap-show-map">
<?php
开发者ID:disjfa,项目名称:dimme-jour,代码行数:31,代码来源:archive-googlemap.php
示例15: screenr_page_header_cover
/**
* Setup page header cover
*
* @return bool
*/
function screenr_page_header_cover()
{
if (is_page_template('template-frontpage.php')) {
return false;
}
$image = $title = $desc = '';
if (is_singular() && !is_attachment()) {
if (is_single()) {
$title = esc_html(get_theme_mod('page_blog_title', esc_html__('The Blog', 'screenr')));
} else {
$title = get_the_title();
}
} elseif (is_search()) {
$title = sprintf(esc_html__('Search Results for: %s', 'screenr'), '<span>' . esc_html(get_search_query()) . '</span>');
} elseif ((is_home() || is_front_page()) && !is_attachment()) {
$title = esc_html(get_theme_mod('page_blog_title', esc_html__('The Blog', 'screenr')));
} elseif (is_404()) {
$title = sprintf(esc_html__('%s 404 Not Found!', 'screenr'), '<i class="fa fa-frown-o"></i><br>');
} else {
$title = get_the_archive_title();
$desc = get_the_archive_description();
}
if (!$image) {
$image = get_header_image();
}
$is_parallax = true;
$item = array('position' => 'center', 'pd_top' => get_theme_mod('page_header_pdtop') == '' ? 13 : get_theme_mod('page_header_pdtop'), 'pd_bottom' => get_theme_mod('page_header_pdbottom') == '' ? 13 : get_theme_mod('page_header_pdbottom'), 'title' => $title, 'desc' => $desc, 'image' => $image);
$classes = array('section-slider', 'swiper-slider');
if ($is_parallax) {
$classes[] = 'fixed';
}
$item = apply_filters('screenr_page_header_item', $item);
if ($item['image']) {
$classes[] = 'has-image';
} else {
$classes[] = 'no-image';
}
$classes = apply_filters('screenr_page_header_cover_class', $classes);
?>
<section id="page-header-cover" class="<?php
echo esc_attr(join(' ', $classes));
?>
" >
<div class="swiper-container" data-autoplay="0">
<div class="swiper-wrapper">
<?php
$style = "";
if ($item['image']) {
$style = ' style="background-image: url(\'' . esc_url($item['image']) . '\');" ';
}
$html = '<div class="swiper-slide slide-align-' . esc_attr($item['position']) . '"' . $style . '>';
$style = '';
if ($item['pd_top'] != '') {
$style .= 'padding-top: ' . floatval($item['pd_top']) . '%; ';
}
if ($item['pd_bottom'] != '') {
$style .= 'padding-bottom: ' . floatval($item['pd_bottom']) . '%; ';
}
if ($style != '') {
$style = ' style="' . $style . '" ';
}
$html .= '<div class="swiper-slide-intro">';
$html .= '<div class="swiper-intro-inner"' . $style . '>';
if ($item['title']) {
$html .= '<h2 class="swiper-slide-heading">' . wp_kses_post($item['title']) . '</h2>';
}
if ($item['desc']) {
$html .= '<div class="swiper-slide-desc">' . apply_filters('screenr_content_text', $item['desc']) . '</div>';
}
$html .= '</div>';
$html .= '</div>';
$html .= '<div class="overlay"></div>';
$html .= '</div>';
echo $html;
?>
</div>
</div>
</section>
<?php
}
开发者ID:kixortillan,项目名称:dfosashworks,代码行数:85,代码来源:extras.php
示例16: kt_get_page_subtitle
/**
* Get page tagline
*
* @return mixed|void
*/
function kt_get_page_subtitle()
{
global $post;
$tagline = '';
if (is_front_page() && !is_singular('page')) {
$tagline = esc_html__('Lastest posts', 'wingman');
} elseif (is_home()) {
$page_for_posts = get_option('page_for_posts', true);
$tagline = nl2br(rwmb_meta('_kt_page_header_subtitle', array(), $page_for_posts));
} elseif (is_front_page() && is_singular('page')) {
$tagline = rwmb_meta('_kt_page_header_subtitle');
} elseif (is_archive()) {
$tagline = get_the_archive_description();
if (kt_is_wc()) {
if (is_shop()) {
$shop_page_id = get_option('woocommerce_shop_page_id');
$tagline = rwmb_meta('_kt_page_header_subtitle', array(), $shop_page_id);
}
if (is_product_category() || is_product_tag()) {
$tagline = '';
}
}
} elseif (is_search()) {
$tagline = '';
} elseif ($post) {
$post_id = $post->ID;
$tagline = nl2br(rwmb_meta('_kt_page_header_subtitle', array(), $post_id));
}
return apply_filters('kt_subtitle', $tagline);
}
开发者ID:websideas,项目名称:Mondova,代码行数:35,代码来源:functions.php
示例17: get_post_share_details
/**
* get_post_share_details
*
* Generate post sharing details
*
* @param string $position
* @return array
*/
function get_post_share_details($position)
{
global $post;
if ($this->general_options['reset_postdata']) {
wp_reset_postdata();
}
if (ESSBOptionValuesHelper::options_bool_value($this->options, 'force_wp_query_postid')) {
$current_query_id = get_queried_object_id();
$post = get_post($current_query_id);
}
$url = "";
$title = "";
$image = "";
$description = "";
$title_plain = "";
$twitter_user = $this->network_options['twitter_user'];
$twitter_hashtags = $this->network_options['twitter_hashtags'];
$twitter_customtweet = "";
$url = $post ? get_permalink() : ESSBUrlHelper::get_current_url('raw');
if (ESSBOptionValuesHelper::options_bool_value($this->options, 'avoid_nextpage')) {
$url = $post ? get_permalink(get_the_ID()) : ESSBUrlHelper::get_current_url('raw');
}
if (ESSBOptionValuesHelper::options_bool_value($this->options, 'force_wp_fullurl')) {
$url = ESSBUrlHelper::get_current_page_url();
}
if (ESSBOptionValuesHelper::options_bool_value($this->options, 'always_use_http')) {
$url = str_replace("https://", "http://", $url);
}
if (!defined('ESSB3_LIGHTMODE')) {
$mycred_referral_activate = ESSBOptionValuesHelper::options_bool_value($this->options, 'mycred_referral_activate');
if ($mycred_referral_activate && function_exists('mycred_render_affiliate_link')) {
$url = mycred_render_affiliate_link(array('url' => $url));
}
}
if (isset($post)) {
$title = esc_attr(urlencode($post->post_title));
$title_plain = $post->post_title;
$image = ESSBCoreHelper::get_post_featured_image($post->ID);
$description = $post->post_excerpt;
if ($position == "heroshare") {
if ($description == "") {
$working_post_content = $post->post_content;
$working_post_content = strip_tags($working_post_content);
$working_post_content = preg_replace('/\\s+/', ' ', $working_post_content);
$working_post_content = strip_shortcodes($working_post_content);
$working_post_content = trim($working_post_content);
$working_post_content = substr($working_post_content, 0, 400);
$description = $working_post_content;
}
}
}
$list_of_articles_mode = false;
if (is_archive() || is_front_page() || is_search() || is_tag() || is_post_type_archive()) {
if ($position == "sidebar" || $position == "flyin" || $position == "popup" || $position == "topbar" || $position == "bottombar") {
if (ESSBOptionValuesHelper::options_bool_value($this->options, 'force_archive_pages')) {
$list_of_articles_mode = true;
$url = ESSBUrlHelper::get_current_page_url();
if (is_front_page()) {
$title = get_bloginfo('name');
$title_plain = $title;
$description = get_bloginfo('description');
} else {
$title = get_the_archive_title();
$title_plain = $title;
$description = get_the_archive_description();
}
}
}
}
// apply custom share options
if ($this->general_options['customshare']) {
if ($this->general_options['customshare_text'] != '') {
$title = $this->general_options['customshare_text'];
$title_plain = $title;
}
if ($this->general_options['customshare_url'] != '') {
$url = $this->general_options['customshare_url'];
}
if ($this->general_options['customshare_image'] != '') {
$image = $this->general_options['customshare_image'];
}
if ($this->general_options['customshare_description'] != '') {
$description = $this->general_options['customshare_description'];
}
}
$twitter_customtweet = $title;
$post_pin_image = "";
// apply post custom share options
if (isset($post) && !$list_of_articles_mode) {
$twitter_message_tags_to_hashtags = ESSBOptionValuesHelper::options_bool_value($this->options, 'twitter_message_tags_to_hashtags');
if ($twitter_message_tags_to_hashtags) {
$post_tags = wp_get_post_tags($post->ID);
//.........这里部分代码省略.........
开发者ID:JSreactor,项目名称:MarketCrater.com,代码行数:101,代码来源:essb-core.php
示例18: opengraph_default_description
/**
* Default description property, using the excerpt or content for posts, or the
* bloginfo description.
*/
function opengraph_default_description($description)
{
if (empty($description)) {
if (is_singular()) {
$post = get_queried_object();
if (!empty($post->post_excerpt)) {
$description = $post->post_excerpt;
} else {
$description = $post->post_content;
}
} else {
if (is_author()) {
$id = get_queried_object_id();
$description = get_user_meta($id, 'description', true);
} else {
if (is_category() && category_description()) {
$description = category_description();
} else {
if (is_tag() && tag_description()) {
$description = tag_description();
} else {
if (is_archive() && function_exists("get_the_archive_description") && get_the_archive_description()) {
// new in version 4.1 to get all other archive descriptions
$description = get_the_archive_description();
} else {
$description = get_bloginfo('description');
}
}
}
}
}
}
// strip description to first 55 words.
$description = strip_tags(strip_shortcodes($description));
$description = __opengraph_trim_text($description);
return $description;
}
开发者ID:vegardvelle,项目名称:radikalportal,代码行数:41,代码来源:opengraph.php
示例19: get_post_field
>
<?php
if (is_home() && !is_front_page()) {
$toivo_archive_title = get_post_field('post_title', get_queried_object_id());
$toivo_loop_desc = get_post_field('post_content', get_queried_object_id(), 'raw');
} elseif (is_search()) {
/* Translators: %s is the search query. The HTML entities are opening and closing curly quotes. */
$toivo_archive_title = sprintf(__('Search results for “%s”', 'toivo-lite'), get_search_query());
$toivo_loop_desc = sprintf(__('You are browsing the search results for “%s”', 'toivo-lite'), get_search_query());
} elseif (is_author()) {
$toivo_archive_title = get_the_archive_title();
$toivo_loop_desc = get_the_author_meta('description', get_query_var('author'));
} else {
$toivo_archive_title = get_the_archive_title();
$toivo_loop_desc = get_the_archive_description();
}
?>
<h1 class="site-title loop-title" <?php
hybrid_attr('loop-title');
?>
><?php
echo $toivo_archive_title;
?>
</h1>
<?php
if ($toivo_loop_desc) {
?>
开发者ID:KateKupka,项目名称:darwin,代码行数:30,代码来源:loop-meta.php
示例20: tc_archive_title_and_class_callback
/**
* Return 1) the archive title html content OR 2) the archive title class OR 3) the boolean
* hook : tc_display_customizr_headings
* @return boolean
*
* @package Customizr
* @since Customizr 3.2.0
*/
function tc_archive_title_and_class_callback($_title = null, $_return_class = false)
{
//declares variables to return
$content = false;
$_header_class = false;
//case page for posts but not on front
global $wp_query;
if ($wp_query->is_posts_page && !is_front_page()) {
//get page for post ID
$page_for_post_id = get_option('page_for_posts');
$_header_class = array('entry-header');
if ($_return_class) {
return $_header_class;
}
$content = sprintf('<%1$s class="entry-title %2$s">%3$s</%1$s>', apply_filters('tc_content_title_tag', 'h1'), apply_filters('tc_content_title_icon', 'format-icon'), get_the_title($page_for_post_id));
$content = apply_filters('tc_page_for_post_header_content', $content);
} else {
if (is_404()) {
$_header_class = array('entry-header');
if ($_return_class) {
return $_header_class;
}
$content = sprintf('<h1 class="entry-title %1$s">%2$s</h1>', apply_filters('tc_archive_icon', ''), apply_filters('tc_404_title', __('Ooops, page not found', 'customizr')));
$content = apply_filters('tc_404_header_content', $content);
} else {
if (is_search() && !is_singular()) {
$_header_class = array('search-header');
if ($_return_class) {
return $_header_class;
}
$content = sprintf('<div class="row-fluid"><div class="%1$s"><h1 class="%2$s">%3$s%4$s %5$s </h1></div><div class="%6$s">%7$s</div></div>', apply_filters('tc_search_result_header_title_class', 'span8'), apply_filters('tc_archive_icon', 'format-icon'), have_posts() ? '' : __('No', 'customizr') . ' ', apply_filters('tc_search_results_title', __('Search Results for :', 'customizr')), '<span>' . get_search_query() . '</span>', apply_filters('tc_search_result_header_form_class', 'span4'), have_posts() ? get_search_form(false) : '');
$content = apply_filters('tc_search_results_header_content', $content);
} else {
if (is_archive()) {
$_header_class = array('archive-header');
if ($_return_class) {
return $_header_class;
}
//author's posts page
if (is_author()) {
//gets the user ID
$user_id = get_query_var('author');
$content = sprintf('<h1 class="%1$s">%2$s %3$s</h1>', apply_filters('tc_archive_icon', 'format-icon'), apply_filters('tc_author_archive_title', __('', 'customizr')), '<span class="vcard">' . get_the_author_meta('display_name', $user_id) . '</span>');
if (apply_filters('tc_show_author_meta', get_the_author_meta('description', $user_id))) {
$content .= sprintf('%1$s<div class="author-info"><div class="%2$s">%3$s</div></div>', apply_filters('tc_author_meta_separator', '<hr class="featurette-divider ' . current_filter() . '">'), apply_filters('tc_author_meta_wrapper_class', 'row-fluid'), sprintf('<div class="%1$s">%2$s</div><div class="%3$s"><h2>%4$s</h2><p>%5$s</p></div>', apply_filters('tc_author_meta_avatar_class', 'comment-avatar author-avatar span2'), get_avatar(get_the_author_meta('user_email', $user_id), apply_filters('tc_author_bio_avatar_size', 100)), apply_filters('tc_author_meta_content_class', 'author-description span10'), sprintf(__('About %s', 'customizr'), get_the_author()), get_the_author_meta('description', $user_id)));
}
$content = apply_filters('tc_author_header_content', $content);
} else {
if (is_category()) {
$content = sprintf('<h1 class="%1$s">%2$s %3$s</h1>', apply_filters('tc_archive_icon', 'format-icon'), apply_filters('tc_category_archive_title', __('', 'customizr')), '<span>' . single_cat_title('', false) . '</span>');
if (apply_filters('tc_show_cat_description', category_description())) {
$content .= sprintf('<div class="archive-meta">%1$s</div>', category_description());
}
$content = apply_filters('tc_category_archive_header_content', $content);
} else {
if (is_tag()) {
$content = sprintf('<h1 class="%1$s">%2$s %3$s</h1>', apply_filters('tc_archive_icon', 'format-icon'), apply_filters('tc_tag_archive_title', __('', 'customizr')), '<span>' . single_tag_title('', false) . '</span>');
if (apply_filters('tc_show_tag_description', tag_description())) {
$content .= sprintf('<div class="archive-meta">%1$s</div>', tag_description());
}
$content = apply_filters('tc_tag_archive_header_content', $content);
} else {
if (is_day() || is_month() || is_year()) {
$archive_type = is_day() ? sprintf(__('Daily Archives: %s', 'customizr'), '<span>' . get_the_date() . '</span>') : __('Archives', 'customizr');
$archive_type = is_month() ? sprintf(__('Monthly Archives: %s', 'customizr'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'customizr')) . '</span>') : $archive_type;
$archive_type = is_year() ? sprintf(__('Yearly Archives: %s', 'customizr'), '<span>' . get_the_date(_x('Y', 'yearly archives date format', 'customizr')) . '</span>') : $archive_type;
$content = sprintf('<h1 class="%1$s">%2$s</h1>', apply_filters('tc_archive_icon', 'format-icon'), $archive_type);
$content = apply_filters('tc_time_archive_header_content', $content);
} else {
if (apply_filters('tc_show_tax_archive_title', true)) {
$content = sprintf('<h1 class="%1$s">%2$s</h1>', apply_filters('tc_archive_icon', 'format-icon'), apply_filters('tc_tax_archive_title', get_the_archive_title()));
$tax_description = get_the_archive_description();
if (apply_filters('tc_show_tax_description', $tax_description)) {
$content .= sprintf('<div class="archive-meta">%1$s</div>', $tax_description);
}
$content = apply_filters('tc_tax_archive_header_content', $content);
}
}
}
}
}
}
}
}
}
// end all archives
return $_return_class ? $_header_class : $content;
}
开发者ID:vhngroup,项目名称:customizr,代码行数:96,代码来源:class-content-headings.php
注:本文中的get_the_archive_description函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论