• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP post_password_required函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中post_password_required函数的典型用法代码示例。如果您正苦于以下问题:PHP post_password_required函数的具体用法?PHP post_password_required怎么用?PHP post_password_required使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了post_password_required函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: twentysixteen_entry_meta

function twentysixteen_entry_meta()
{
    ob_start();
    if ('post' === get_post_type()) {
        ob_start();
        twentysixteen_entry_date();
        $postedOn = ob_get_clean();
        $author_avatar_size = apply_filters('twentysixteen_author_avatar_size', 49);
        printf('<div class="name-date"><div class="name"><span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></div><div class="date">%5$s</div></div><div class="avatar">%1$s</div>', get_avatar(get_the_author_meta('user_email'), $author_avatar_size), _x('Author', 'Used before post author name.', 'twentysixteen'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author(), $postedOn);
    }
    if (in_array(get_post_type(), array('attachment'))) {
        twentysixteen_entry_date();
    }
    $authordate = ob_get_clean();
    printf('<div class="author-date">%s</div>', $authordate);
    $format = get_post_format();
    if (current_theme_supports('post-formats', $format)) {
        printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'twentysixteen')), esc_url(get_post_format_link($format)), get_post_format_string($format));
    }
    echo '<div class="taxonomies">';
    if ('post' === get_post_type()) {
        twentysixteen_entry_taxonomies();
    }
    echo '</div>';
    if (!is_singular() && !post_password_required() && (comments_open() || get_comments_number())) {
        echo '<span class="comments-link">';
        comments_popup_link(sprintf(__('Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen'), get_the_title()));
        echo '</span>';
    }
}
开发者ID:GamingGroupAachen,项目名称:wp-template-ggac-2,代码行数:30,代码来源:functions.php


示例2: tm_vals_blog_posted_on

 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function tm_vals_blog_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     }
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     // comments in header
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         comments_popup_link(esc_html__('Leave a comment', 'tm-vals-blog'), esc_html__('1', 'tm-vals-blog'), esc_html__('%', 'tm-vals-blog'));
         echo '</span>';
     }
     /*	$posted_on = sprintf(
     		esc_html_x( 'Posted on %s', 'post date', 'tm-vals-blog' ),
     		'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
     	);
     
     	$byline = sprintf(
     		esc_html_x( 'by %s', 'post author', 'tm-vals-blog' ),
     		'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
     	);
     
     	echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>'; // WPCS: XSS OK.
     */
 }
开发者ID:vfedushchin,项目名称:Tm-kursi-theme,代码行数:29,代码来源:template-tags.php


示例3: italystrap_excerpt_password_form

function italystrap_excerpt_password_form($excerpt)
{
    if (post_password_required()) {
        $excerpt = get_the_password_form();
    }
    return $excerpt;
}
开发者ID:AndrGelmini,项目名称:ItalyStrap,代码行数:7,代码来源:password_protection.php


示例4: base_post_thumbnail

    /**
     * Display the post thumbnail
     *
     * @return void
     */
    function base_post_thumbnail($postid)
    {
        if (post_password_required() || !has_post_thumbnail()) {
            return;
        }
        $format = get_post_format();
        if ($format == 'link') {
            $link_to = get_post_meta($postid, '_zilla_link_url', true);
        } else {
            $link_to = get_the_permalink($postid);
        }
        ?>

	<div class="entry-thumbnail">
	<?php 
        if (is_singular()) {
            the_post_thumbnail('full');
        } else {
            ?>
		<a href="<?php 
            echo esc_url($link_to);
            ?>
">
			<?php 
            the_post_thumbnail('blog-thumb');
            ?>
		</a>
	<?php 
        }
        ?>
	</div>

<?php 
    }
开发者ID:TyRichards,项目名称:paradox,代码行数:39,代码来源:template-tags.php


示例5: do_x_post_password_cb

 function do_x_post_password_cb()
 {
     //snag from wp-login.php:386-393
     require_once ABSPATH . 'wp-includes/class-phpass.php';
     // By default, use the portable hash from phpass
     $wp_hasher = new PasswordHash(8, true);
     // 10 days
     setcookie('wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword(stripslashes($_POST['pass'])), time() + 864000, COOKIEPATH);
     //fake it so it's available in the loop below
     $_COOKIE['wp-postpass_' . COOKIEHASH] = $wp_hasher->HashPassword(stripslashes($_POST['pass']));
     $q = new WP_Query("p={$_POST['pid']}");
     if ($q->have_posts()) {
         while ($q->have_posts()) {
             $q->the_post();
             // verifies password hash
             if (post_password_required()) {
                 wp_send_json_error('Invalid password');
             }
             // get post title
             ob_start();
             the_title(sprintf('<a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a>');
             $title = ob_get_clean();
             // get post content
             ob_start();
             the_content();
             $content = ob_get_clean();
         }
     }
     wp_reset_postdata();
     $return = array('title' => $title, 'content' => $content);
     wp_send_json_success($return);
 }
开发者ID:trepmal,项目名称:ajax-password-protected,代码行数:32,代码来源:ajax-password-protected.php


示例6: add_content

 public function add_content($content, $template, $position = 10)
 {
     if (!defined('ABSPATH')) {
         exit;
     }
     // Exit if accessed directly
     if (!in_the_loop()) {
         return;
     }
     // Return if not in main loop
     $content = '<div class="sp-post-content">' . $content . '</div>';
     ob_start();
     if ($position <= 0) {
         echo $content;
     }
     do_action('sportspress_before_single_' . $template);
     if (post_password_required()) {
         echo get_the_password_form();
         return;
     }
     if ($position > 0 && $position <= 5) {
         echo $content;
     }
     do_action('sportspress_single_' . $template . '_content');
     if ($position > 5 && $position <= 10) {
         echo $content;
     }
     do_action('sportspress_after_single_' . $template);
     if ($position > 10) {
         echo $content;
     }
     return ob_get_clean();
 }
开发者ID:ArnaudGuillou,项目名称:SiteESBVolley,代码行数:33,代码来源:class-sp-template-loader.php


示例7: build_output

 private function build_output($tag)
 {
     // More link
     if (!empty($this->params['catlink_tag'])) {
         if (!empty($this->params['catlink_class'])) {
             $this->lcp_output .= $this->get_category_link($this->params['catlink_tag'], $this->params['catlink_class']);
         } else {
             $this->lcp_output .= $this->get_category_link($this->params['catlink_tag']);
         }
     } else {
         $this->lcp_output .= $this->get_category_link("strong");
     }
     $this->lcp_output .= '<' . $tag;
     //Give a class to wrapper tag
     if (isset($this->params['class'])) {
         $this->lcp_output .= ' class="' . $this->params['class'] . '"';
     }
     //Give id to wrapper tag
     if (isset($this->params['instance'])) {
         $this->lcp_output .= ' id=lcp_instance_' . $this->params['instance'];
     }
     $this->lcp_output .= '>';
     $inner_tag = $tag == 'ul' ? 'li' : 'p';
     //Posts loop
     foreach ($this->catlist->get_categories_posts() as $single) {
         if (!post_password_required($single)) {
             $this->lcp_output .= $this->lcp_build_post($single, $inner_tag);
         }
     }
     //Close wrapper tag
     $this->lcp_output .= '</' . $tag . '>';
     // More link
     if (!empty($this->params['morelink_tag'])) {
         if (!empty($this->params['morelink_class'])) {
             $this->lcp_output .= $this->get_morelink($this->params['morelink_tag'], $this->params['morelink_class']);
         } else {
             $this->lcp_output .= $this->get_morelink($this->params['morelink_tag']);
         }
     } else {
         $this->lcp_output .= $this->get_morelink();
     }
     if (!empty($this->params['pagination']) && $this->params['pagination'] == "yes") {
         $lcp_paginator = '';
         $pages_count = ceil($this->catlist->get_posts_count() / $this->catlist->get_number_posts());
         for ($i = 1; $i <= $pages_count; $i++) {
             $lcp_paginator .= $this->lcp_page_link($i, true);
         }
         $this->lcp_output .= "<ul class='lcp_paginator'>";
         // Add "Previous" link
         if ($this->catlist->get_page() > 1) {
             $this->lcp_output .= $this->lcp_page_link(intval($this->catlist->get_page()) - 1, "<<");
         }
         $this->lcp_output .= $lcp_paginator;
         // Add "Next" link
         if ($this->catlist->get_page() < $pages_count) {
             $this->lcp_output .= $this->lcp_page_link(intval($this->catlist->get_page()) + 1, ">>");
         }
         $this->lcp_output .= "</ul>";
     }
 }
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:60,代码来源:CatListDisplayer.php


示例8: listable_entry_footer

 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function listable_entry_footer()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', 'listable'));
         if ($categories_list && listable_categorized_blog()) {
             printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'listable') . '</span>', $categories_list);
             // WPCS: XSS OK.
         }
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', esc_html__(', ', 'listable'));
         if ($tags_list) {
             printf('<span class="tags-links">' . esc_html__('Tagged %1$s', 'listable') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         comments_popup_link(esc_html__('Leave a comment', 'listable'), esc_html__('1 Comment', 'listable'), esc_html__('% Comments', 'listable'));
         echo '</span>';
     }
     //
     //	edit_post_link(
     //		sprintf(
     //			/* translators: %s: Name of current post */
     //			esc_html__( 'Edit %s', 'listable' ),
     //			the_title( '<span class="screen-reader-text">"', '"</span>', false )
     //		),
     //		'<span class="edit-link">',
     //		'</span>'
     //	);
 }
开发者ID:swaroop42,项目名称:RockRose,代码行数:36,代码来源:template-tags.php


示例9: moderna_tag_comment

 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function moderna_tag_comment()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         /* translators: used between list items, there is a space after the comma */
         /*            $categories_list = get_the_category_list(esc_html__(', ', 'moderna'));
                       if ($categories_list && moderna_categorized_blog()) {
                           printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'moderna') . '</span>', $categories_list); // WPCS: XSS OK.
                       }*/
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', '<div style="float: left;">,&nbsp;</div>');
         printf('<li><i class="icon-folder-open"></i>' . esc_html__('%1$s', 'moderna') . '</li>', $tags_list);
         // WPCS: XSS OK.
     }
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<li><i class="icon-comments"></i>';
         comments_popup_link(esc_html__('No comments', 'moderna'), esc_html__('1 Comment', 'moderna'), esc_html__('% Comments', 'moderna'));
         echo '</li>';
     }
     /*
                          edit_post_link(
                              sprintf(
                              // translators: %s: Name of current post
                                  esc_html__('Edit %s', 'moderna'),
                                  the_title('<span class="screen-reader-text">"', '"</span>', false)
                              ),
                              '<span class="edit-link">',
                              '</span>'
                          );*/
 }
开发者ID:nordcap,项目名称:wp_template_moderna,代码行数:33,代码来源:template-tags.php


示例10: atout_thumbnail

/**
* Display the post thumbnail if applicable 
* 
* @since Atout 1.0
*/
function atout_thumbnail()
{
    if (post_password_required() || is_attachment() || !has_post_thumbnail()) {
        return;
    }
    ?>

  <figure class="thumbnail">
      <?php 
    if (get_theme_mod('thumbnail_link') == 'yes') {
        ?>
        <a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_post_thumbnail();
        ?>
</a>
      <?php 
    } else {
        the_post_thumbnail();
    }
    ?>
  </figure>
  <?php 
}
开发者ID:pbhanu1994,项目名称:bhanuprakash,代码行数:31,代码来源:template-tags.php


示例11: hacker_entry_footer

    /**
     * Prints HTML with meta information for the categories, tags and comments.
     */
    function hacker_entry_footer()
    {
        // Hide category and tag text for pages.
        ?>
	<div class="Article__meta pull-left">
	<?php 
        if ('post' === get_post_type()) {
            echo get_the_tag_list('<span class="post-tags"><i class="icon-tags"></i>', '', '</span>');
        }
        ?>
	</div>
	<!-- END .pull-left -->
	<div class="Article__meta pull-right">
	<?php 
        $post_id = get_the_ID();
        $likes = get_post_meta($post_id, '_likes', true);
        $likes = absint($likes);
        printf('<span><a href="#" class="js-rating" data-post="%1$s"><i class="icon-heart"></i><span class="js-count">%2$s</span></a></span>', $post_id, $likes);
        if (!post_password_required() && (comments_open() || get_comments_number())) {
            echo '<span><i class="icon-comments"></i><span>';
            comments_popup_link(esc_html__('No Comment', 'hacker'), esc_html__('1 Comment', 'hacker'), esc_html__('% Comments', 'hacker'));
            echo '</span></span>';
        }
        ?>
	</div>
	<!-- END .pull-right -->
<?php 
    }
开发者ID:yanvalue,项目名称:wordpress,代码行数:31,代码来源:template-tags.php


示例12: activetheme_post_thumbnail

    /**
     * TODO: PHPDoc
     */
    function activetheme_post_thumbnail()
    {
        if (post_password_required() || is_attachment() || !has_post_thumbnail()) {
            return;
        }
        if (is_single()) {
            ?>
	<div class="post-thumbnail">
	<?php 
            the_post_thumbnail('media-thumbnail', array('class' => 'img-responsive'));
            ?>
	</div>

	<?php 
        } else {
            ?>

        <a class="post-thumbnail" href="<?php 
            the_permalink();
            ?>
">
        <?php 
            the_post_thumbnail('media-thumbnail', array('class' => 'img-responsive'));
            ?>
        </a>
<?php 
        }
    }
开发者ID:TaylorFoster90,项目名称:Breton-Bay,代码行数:31,代码来源:posts.php


示例13: zatolab_post_classes

/**
 * Extend the default WordPress post classes.
 *
 * Adds a post class to denote:
 * Non-password protected page with a post thumbnail.
 *
 * @since Dichan 1.0
 *
 * @param array $classes A list of existing post class values.
 * @return array The filtered post class list.
 */
function zatolab_post_classes($classes)
{
    if (!post_password_required() && has_post_thumbnail()) {
        $classes[] = 'has-post-thumbnail';
    }
    return $classes;
}
开发者ID:webtechfreaky,项目名称:vienna-content-focused-personal-blog-theme,代码行数:18,代码来源:postclasses.php


示例14: staticboards_post_thumbnail

    function staticboards_post_thumbnail()
    {
        if (post_password_required() || is_attachment() || !has_post_thumbnail()) {
            return;
        }
        if (is_singular()) {
            ?>

        <div class="post-thumbnail">
        <?php 
            the_post_thumbnail('post-thumbnail', array('class' => 'img-fullwidth'));
            ?>
        </div><!-- .post-thumbnail -->

    <?php 
        } else {
            ?>

        <a class="post-thumbnail" href="<?php 
            the_permalink();
            ?>
" aria-hidden="true">
            <?php 
            the_post_thumbnail('post-thumbnail', array('class' => 'img-fullwidth', 'alt' => the_title_attribute('echo=0')));
            ?>
        </a>

    <?php 
        }
        // End is_singular()
    }
开发者ID:staticboards,项目名称:staticboards-wp-theme,代码行数:31,代码来源:structure.php


示例15: bbp_theme_before_topic_title

 static function bbp_theme_before_topic_title()
 {
     $topic_id = bbp_get_topic_id();
     if (post_password_required($topic_id)) {
         _e('<span class="protected_title_format">Protected:</span> ', 'bbpresskr');
     }
 }
开发者ID:082net,项目名称:bbpresskr,代码行数:7,代码来源:secret.php


示例16: impronta_metadata

 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function impronta_metadata()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         echo '<p class="metadata">';
         $byline = sprintf(esc_html_x('By %s', 'post author', 'impronta'), '<span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span> ');
         echo $byline;
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', 'impronta'));
         if ($categories_list && impronta_categorized_blog()) {
             printf('<span class="cat-links">' . esc_html_x('on %1$s ', 'on categories', 'impronta') . '</span>', $categories_list);
             // WPCS: XSS OK.
         }
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', esc_html__(', ', 'impronta'));
         if ($tags_list) {
             printf(esc_html__('tagged %1$s', 'impronta'), $tags_list);
             // WPCS: XSS OK.
         }
         if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
             if (get_comments_number(get_the_id()) == 0) {
                 echo esc_html__('- ', 'impronta');
             } else {
                 echo esc_html__('with ', 'impronta');
             }
             comments_popup_link(esc_html__('Leave a comment', 'impronta'), esc_html__('1 Comment', 'impronta'), esc_html__('% Comments', 'impronta'));
         }
         if (is_sticky()) {
             echo ' - ' . '<i class="feature-star fa fa-star" data-toggle="tooltip" data-placement="right" title="' . esc_attr__('Featured Post', 'impronta') . '"></i>';
         }
         echo '</p>';
     }
 }
开发者ID:nicoandrade,项目名称:Impronta,代码行数:36,代码来源:template-tags.php


示例17: staticpress_save_single

 public function staticpress_save_single($postId)
 {
     if (get_post_status($postId) === 'publish' && !post_password_required($postId)) {
         $url = get_permalink($postId);
         $this->create_static_file($url, 'other_page', false, true);
     }
 }
开发者ID:jason-braun-sociomantic-mouse,项目名称:staticpress,代码行数:7,代码来源:class-static_press.php


示例18: kanec_entry_meta

/**
 * This is a duplicate of the above. Probably delete others
 */
function kanec_entry_meta()
{
    // Time
    $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
    if (get_the_time('U') !== get_the_modified_time('U')) {
        $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
    }
    $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
    echo '<div class="posted-on"><i class="icon icon-calendar-o"></i><a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a></div>';
    // Author
    echo '<div class="byline"><i class="icon icon-user"></i><span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span></div>';
    // Categories & Tags
    // Hide category and tag text for pages.
    if ('post' === get_post_type()) {
        /* translators: used between list items, there is a space after the comma */
        $categories_list = get_the_category_list(esc_html__(', ', 'kanec'));
        if ($categories_list && kanec_categorized_blog()) {
            echo '<div class="cat-links"><i class="icon icon-folder-open"></i>' . $categories_list . '</div>';
        }
        /* translators: used between list items, there is a space after the comma */
        $tags_list = get_the_tag_list('', esc_html__(', ', 'kanec'));
        if ($tags_list) {
            echo '<div class="tags-links"><i class="icon icon-tags"></i>' . $tags_list . '</div>';
        }
    }
    if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
        echo '<div class="comments-link"><i class="icon icon-comments"></i>';
        comments_popup_link(esc_html__('Leave a comment', 'kanec'), esc_html__('1 Comment', 'kanec'), esc_html__('% Comments', 'kanec'));
        echo '</div>';
    }
}
开发者ID:vonkanehoffen,项目名称:kanec-wp-theme,代码行数:34,代码来源:template-tags.php


示例19: register_meta_tags

 public function register_meta_tags()
 {
     add_action('wp_head', function () {
         if (is_singular() && false == post_password_required()) {
             if ('' == ($description = get_the_excerpt())) {
                 $description = wp_trim_words(esc_html(strip_shortcodes(get_the_content())), 20, '...');
             }
         } elseif (is_category() && '' != category_description()) {
             $description = category_description();
         } elseif (is_tag() && '' != term_description()) {
             $description = term_description();
         } else {
             $description = get_bloginfo('description');
         }
         $description = esc_attr($description);
         echo "<meta name=\"description\" content=\"{$description}\" />\n";
         echo "<meta name=\"og:description\" content=\"{$description}\" />\n";
         if (is_singular() && false == post_password_required() && has_post_thumbnail()) {
             list($image, $width, $height) = wp_get_attachment_image_src(get_post_thumbnail_id(), 'facebook');
         } else {
             $image = apply_filters('', $this->get_theme_assets_url() . '/images/logo-fb.png');
         }
         $image = esc_url($image);
         echo "<meta name=\"og:image\" content=\"{$image}\" />\n";
         echo "<meta name=\"twitter:image\" content=\"{$image}\" />\n";
     });
 }
开发者ID:shtrihstr,项目名称:wpk15-theme-wpkit,代码行数:27,代码来源:Initialization.php


示例20: beryl_post_thumbnail

/**
 * Display an optional post thumbnail.
 *
 * Wraps the post thumbnail in an anchor element on index
 * views, or a div element when on single views.
 *
 * @since Beryl 1.0
 *
 * @return void
*/
function beryl_post_thumbnail()
{
    if (post_password_required() || !has_post_thumbnail()) {
        return;
    }
    if (is_single()) {
        ?>
	<?php 
        the_post_thumbnail('beryl-huge-width');
        ?>

	<?php 
    } else {
        ?>

	<a class="post-thumbnail animated bounceIn" href="<?php 
        the_permalink();
        ?>
">
	<?php 
        the_post_thumbnail('beryl-full-width');
        ?>
	</a>

	<?php 
    }
    // End is_singular()
}
开发者ID:cohhe,项目名称:beryl,代码行数:38,代码来源:template-tags.php



注:本文中的post_password_required函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP post_permalink函数代码示例发布时间:2022-05-15
下一篇:
PHP post_param_integer函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap