本文整理汇总了PHP中get_the_password_form函数的典型用法代码示例。如果您正苦于以下问题:PHP get_the_password_form函数的具体用法?PHP get_the_password_form怎么用?PHP get_the_password_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_the_password_form函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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
示例2: 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
示例3: sunshine_content
function sunshine_content($content)
{
global $post, $wp_query, $sunshine;
if (!is_sunshine()) {
return $content;
}
if (isset($_GET['sunshine_search'])) {
$content = self::get_template('search-results');
} elseif (isset(self::$current_image)) {
if (post_password_required(self::$current_gallery)) {
$content = get_the_password_form();
} else {
$content = self::get_template('image');
}
} elseif (isset(self::$current_gallery)) {
if (post_password_required(self::$current_gallery)) {
$content = get_the_password_form();
} elseif (!current_user_can('sunshine_manage_options') && sunshine_gallery_requires_email(self::$current_gallery->ID)) {
$content = sunshine_gallery_email_form();
} else {
$content = self::get_template('gallery');
}
} elseif (isset(self::$current_order)) {
$content = self::get_template('order');
} elseif (is_page($sunshine->options['page'])) {
$content = $content . self::get_template('home');
} elseif (is_page($sunshine->options['page_cart'])) {
$content = $content . self::get_template('cart');
} elseif (is_page($sunshine->options['page_checkout'])) {
$content = $content . self::get_template('checkout');
} elseif (is_page($sunshine->options['page_account'])) {
$content = $content . self::get_template('account');
}
return apply_filters('sunshine_content', $content);
}
开发者ID:sunshinephotocart,项目名称:sunshine-photo-cart,代码行数:35,代码来源:frontend.class.php
示例4: get_the_content
function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '')
{
global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages;
global $preview;
global $pagenow;
$output = '';
if (!empty($post->post_password)) {
// if there's a password
if (stripslashes($_COOKIE['wp-postpass_' . COOKIEHASH]) != $post->post_password) {
// and it doesn't match the cookie
$output = get_the_password_form();
return $output;
}
}
if ($more_file != '') {
$file = $more_file;
} else {
$file = $pagenow;
}
//$_SERVER['PHP_SELF'];
if ($page > count($pages)) {
// if the requested page doesn't exist
$page = count($pages);
}
// give them the highest numbered page that DOES exist
$content = $pages[$page - 1];
if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
$content = explode($matches[0], $content, 2);
if (!empty($matches[1]) && !empty($more_link_text)) {
$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
}
} else {
$content = array($content);
}
if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
$stripteaser = 1;
}
$teaser = $content[0];
if ($more && $stripteaser) {
$teaser = '';
}
$output .= $teaser;
if (count($content) > 1) {
if ($more) {
$output .= '<span id="more-' . $id . '"></span>' . $content[1];
} else {
$output = balanceTags($output);
if (!empty($more_link_text)) {
$output .= ' <a href="' . get_permalink() . "#more-{$id}\" class=\"more-link\">{$more_link_text}</a>";
}
}
}
if ($preview) {
// preview fix for javascript bug with foreign languages
$output = preg_replace('/\\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output);
}
return $output;
}
开发者ID:helmonaut,项目名称:owb-mirror,代码行数:58,代码来源:post-template.php
示例5: hw_woocommerce_before_single_product
/**
* woocommerce_before_single_product hook
*
* @hooked wc_print_notices - 10
*/
function hw_woocommerce_before_single_product()
{
if (is_singular('product')) {
if (post_password_required()) {
echo get_the_password_form();
return;
}
}
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:14,代码来源:functions.php
示例6: post_content
protected function post_content()
{
$post = get_post($this->post_id);
if (!empty($post->post_password)) {
if (stripslashes($_COOKIE['wp-postpass_' . COOKIEHASH]) != $post->post_password) {
return get_the_password_form();
}
}
return strip_shortcodes($post->post_content);
}
开发者ID:Jevuska,项目名称:extended-related-posts,代码行数:10,代码来源:class-extrp-excerpt.php
示例7: getPostContentAttribute
public function getPostContentAttribute($value)
{
if (post_password_required($this->ID)) {
$value = get_the_password_form($this->ID);
}
if (!$this->suppressPostContentFilters) {
$value = apply_filters('the_content', $value);
}
$this->suppressPostContentFilters = false;
if (!empty($value)) {
return $value;
}
}
开发者ID:expresser,项目名称:posttype,代码行数:13,代码来源:Content.php
示例8: get_content
function get_content()
{
// Get the content of current post. We like to have the entire
// content. If we call get_the_content() we'll only get the teaser +
// page 1.
global $post;
// Password checking copied from
// template-functions-post.php/get_the_content()
// Search shouldn't match a passworded entry anyway.
if (post_password_required()) {
return get_the_password_form();
}
return $post->post_content;
}
开发者ID:gopinathshiva,项目名称:wordpress-vip-plugins,代码行数:14,代码来源:ylsy_search_excerpt.php
示例9: the_content
function the_content($more_link_text = _WP_TPL_MORE, $stripteaser = 0, $more_file = '', $echo = true)
{
if (!empty($GLOBALS['post']->post_password)) {
// if there's a password
if ($_COOKIE['wp-postpass_' . $GLOBALS['cookiehash']] != $GLOBALS['post']->post_password) {
// and it doesn't match the cookie
$output = get_the_password_form(false);
return _echo($output, $echo);
}
}
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
return _echo($content, $echo);
}
开发者ID:nobunobuta,项目名称:xoops_mod_WordPress,代码行数:15,代码来源:template-functions-post.php
示例10: testPasswordedContentWhenEnabled
function testPasswordedContentWhenEnabled()
{
add_filter('timber/post/content/show_password_form_for_protected', function ($maybe_show) {
return true;
});
$quote = 'The way to do well is to do well.';
$post_id = $this->factory->post->create();
$post = new TimberPost($post_id);
$post->post_content = $quote;
$post->post_password = 'burrito';
wp_update_post($post);
$password_form = get_the_password_form($post->ID);
$this->assertEquals($password_form, $post->content());
$this->assertEquals($password_form, $post->get_content());
}
开发者ID:jarednova,项目名称:timber,代码行数:15,代码来源:test-timber-post-password.php
示例11: tarski_excerpt
/**
* tarski_excerpt() - Excerpts a la Tarski.
*
* Code shamelessly borrowed from Kaf Oseo's 'the_excerpt Reloaded' plugin.
* @link http://guff.szub.net/2005/02/26/the-excerpt-reloaded/
* @since 1.2.1
* @deprecated 2.2
* @param $return boolean
* @param string $excerpt_length
* @return string
*/
function tarski_excerpt($return = false, $excerpt_length = 35)
{
_deprecated_function(__FUNCTION__, '2.2', the_excerpt());
global $post;
if (!empty($post->post_password)) {
// if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {
// and it doesn't match cookie
$output = get_the_password_form();
}
if ($return) {
return $output;
} else {
echo $output;
return;
}
}
if (!($text = $post->post_excerpt)) {
$text = $post->post_content;
}
if ($excerpt_length < 0) {
$output = $text;
} else {
str_replace('<!--more-->', '', $text);
$text = explode(' ', $text);
if (count($text) > $excerpt_length) {
$l = $excerpt_length;
$ellipsis = '…';
} else {
$l = count($text);
$ellipsis = false;
}
for ($i = 0; $i < $l; $i++) {
$output .= $text[$i] . ' ';
}
}
$output = rtrim($output, " \n\t\r\v");
$output = strip_tags($output);
$output .= $ellipsis;
$output = apply_filters('get_the_excerpt', $output);
$output = apply_filters('the_excerpt', $output);
$output = apply_filters('tarski_excerpt', $output);
if ($return) {
return $output;
} else {
echo $output;
}
}
开发者ID:jeremylightsmith,项目名称:blog,代码行数:59,代码来源:deprecated.php
示例12: get_content
public function get_content()
{
// Get the content of current post. We like to have the entire
// content. If we call get_the_content() we'll only get the teaser +
// page 1.
$post = get_post($this->post_id);
// Password checking copied from
// template-functions-post.php/get_the_content()
// Search shouldn't match a passworded entry anyway.
if (!empty($post->post_password)) {
// if there's a password
if (stripslashes($_COOKIE['wp-postpass_' . COOKIEHASH]) != $post->post_password) {
// and it doesn't match the cookie
return get_the_password_form();
}
}
return $post->post_content;
}
开发者ID:Jevuska,项目名称:stt2-extension-add-terms,代码行数:18,代码来源:class-stt2extat-searchexcerpt.php
示例13: get_the_content
function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '')
{
global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages;
global $preview;
global $pagenow;
$output = '';
if (!empty($post->post_password)) {
// if there's a password
if (stripslashes($_COOKIE['wp-postpass_' . COOKIEHASH]) != $post->post_password) {
// and it doesn't match the cookie
$output = get_the_password_form();
return $output;
}
}
if ($more_file != '') {
$file = $more_file;
} else {
$file = $pagenow;
}
//$_SERVER['PHP_SELF'];
$content = $pages[$page - 1];
$content = explode('<!--more-->', $content, 2);
if (preg_match('/<!--noteaser-->/', $post->post_content) && (!$multipage || $page == 1)) {
$stripteaser = 1;
}
$teaser = $content[0];
if ($more && $stripteaser) {
$teaser = '';
}
$output .= $teaser;
if (count($content) > 1) {
if ($more) {
$output .= '<a id="more-' . $id . '"></a>' . $content[1];
} else {
$output .= ' <a href="' . get_permalink() . "#more-{$id}\">{$more_link_text}</a>";
}
}
if ($preview) {
// preview fix for javascript bug with foreign languages
$output = preg_replace('/\\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output);
}
return $output;
}
开发者ID:robertlange81,项目名称:Website,代码行数:43,代码来源:template-functions-post.php
示例14: spyropress_get_the_content
function spyropress_get_the_content($post_id = '')
{
if (class_exists('SpyropressBuilder') && spyropress_has_builder_content($post_id)) {
$post = get_post();
// If post password required and it doesn't match the cookie.
if (post_password_required($post)) {
return '<div class="container">' . get_the_password_form($post) . '</div>';
}
return spyropress_get_the_builder_content($post_id);
} elseif (is_singular()) {
ob_start();
echo '<div class="container">';
the_content(__('Continue reading <span class="meta-nav">→</span>', 'spyropress'));
echo '</div>';
return ob_get_clean();
} else {
return get_the_excerpt();
}
}
开发者ID:rinodung,项目名称:myfreetheme,代码行数:19,代码来源:spyropress-template.php
示例15: get_excerpt
function get_excerpt()
{
global $post;
global $hemingwayEx_options;
//modified by Nalin. Added option to allow user to specify length of excerpt
if (!is_null($hemingwayEx_options['excerpt_length']) || $hemingwayEx_options['excerpt_length'] != 0) {
$max_length = $hemingwayEx_options['excerpt_length'];
} else {
$max_length = 75;
// Maximum words.
}
// If they've manually put in an excerpt, and allowed it to be used let it go!
if ($post->post_excerpt && $hemingwayEx_options['use_WP_excerpt'] != 0) {
return $post->post_excerpt;
}
// Check to see if it's a password protected post
if ($post->post_password) {
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {
if (is_feed()) {
return __('This is a protected post');
} else {
return get_the_password_form();
}
}
}
if (strpos($post->post_content, '<!--more-->')) {
// There's a more link
$temp_ex = explode('<!--more-->', $post->post_content, 2);
$excerpt = $temp_ex[0];
} else {
$temp_ex = explode(' ', $post->post_content);
// Split up the spaces
$length = count($temp_ex) < $max_length ? count($temp_ex) : $max_length;
for ($i = 0; $i < $length; $i++) {
$excerpt .= $temp_ex[$i] . ' ';
}
}
$excerpt = balanceTags($excerpt);
$excerpt = apply_filters('the_excerpt', $excerpt);
return $excerpt;
}
开发者ID:nullin,项目名称:hemingwayex,代码行数:41,代码来源:functions.php
示例16: cyberchimps_page_section_order_action
/**
* Checks for all elements added in the page section order drag and drop.
* Calls do_action for each active elements.
**/
function cyberchimps_page_section_order_action()
{
global $post;
// Checking for password protection.
if (!post_password_required()) {
$page_section_order = get_post_meta($post->ID, 'cyberchimps_page_section_order', true);
// set page default if nothing is selected
$page_section_order = $page_section_order == '' ? array('page_section') : $page_section_order;
$slider_size = get_post_meta($post->ID, 'cyberchimps_slider_lite_size', true);
if (is_array($page_section_order)) {
foreach ($page_section_order as $func) {
// checks if slider is selected at half size, if it is it removes it so we can display it above page content
$func = $func == 'slider_lite' && $slider_size == 'half' ? '' : $func;
do_action($func);
}
}
} else {
// Get the form to submit password
echo get_the_password_form();
}
}
开发者ID:AdamFreemer,项目名称:xfx-site,代码行数:25,代码来源:page-hooks.php
示例17: get_the_content
function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages;
global $preview;
global $pagenow;
$output = '';
if ( !empty($post->post_password) ) { // if there's a password
if ( stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) { // and it doesn't match the cookie
$output = get_the_password_form();
return $output;
}
}
if ( $more_file != '' )
$file = $more_file;
else
$file = $pagenow; //$_SERVER['PHP_SELF'];
if ( $page > count($pages) ) // if the requested page doesn't exist
$page = count($pages); // give them the highest numbered page that DOES exist
$content = $pages[$page-1];
$content = explode('<!--more-->', $content, 2);
if ( (preg_match('/<!--noteaser-->/', $post->post_content) && ((!$multipage) || ($page==1))) )
$stripteaser = 1;
$teaser = $content[0];
if ( ($more) && ($stripteaser) )
$teaser = '';
$output .= $teaser;
if ( count($content) > 1 ) {
if ( $more )
$output .= '<a id="more-'.$id.'"></a>'.$content[1];
else
$output .= ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>";
}
if ( $preview ) // preview fix for javascript bug with foreign languages
$output = preg_replace('/\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output);
return $output;
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:40,代码来源:template-functions-post.php
示例18: axiom_template_single_standard_output
function axiom_template_single_standard_output($post_options, $post_data)
{
$post_data['post_views']++;
$avg_author = 0;
$avg_users = 0;
if (!$post_data['post_protected'] && $post_options['reviews'] && axiom_get_custom_option('show_reviews') == 'yes') {
$avg_author = $post_data['post_reviews_author'];
$avg_users = $post_data['post_reviews_users'];
}
$show_title = axiom_get_custom_option('show_post_title') == 'yes' && (axiom_get_custom_option('show_post_title_on_quotes') == 'yes' || !in_array($post_data['post_format'], array('aside', 'chat', 'status', 'link', 'quote')));
$title_tag = axiom_get_custom_option('show_page_top') == 'yes' && axiom_get_custom_option('show_page_title') == 'yes' ? 'h3' : 'h1';
axiom_open_wrapper('<article class="' . join(' ', get_post_class('itemscope' . ' post_item post_item_single' . ' post_featured_' . esc_attr($post_options['post_class']) . ' post_format_' . esc_attr($post_data['post_format']))) . '"' . ' itemscope itemtype="http://schema.org/' . ($avg_author > 0 || $avg_users > 0 ? 'Review' : 'Article') . '">');
$post_icon = axiom_get_custom_option('show_post_icon') == 'yes' ? '<span class="post_icon ' . esc_attr($post_data['post_icon']) . '"></span>' : '';
if ($show_title && $post_options['location'] == 'center' && (axiom_get_custom_option('show_page_top') == 'no' || axiom_get_custom_option('show_page_title') == 'no')) {
?>
<<?php
echo esc_html($title_tag);
?>
itemprop="<?php
echo $avg_author > 0 || $avg_users > 0 ? 'itemReviewed' : 'name';
?>
" class="post_title entry-title"><?php
echo balanceTags($post_icon);
echo $post_data['post_title'];
?>
</<?php
echo esc_html($title_tag);
?>
>
<?php
}
if (!$post_data['post_protected'] && (!empty($post_options['dedicated']) || axiom_get_custom_option('show_featured_image') == 'yes' && $post_data['post_thumb'])) {
?>
<section class="post_featured">
<?php
if (!empty($post_options['dedicated'])) {
echo $post_options['dedicated'];
} else {
axiom_enqueue_popup();
?>
<div class="post_thumb" data-image="<?php
echo esc_url($post_data['post_attachment']);
?>
" data-title="<?php
echo esc_attr($post_data['post_title']);
?>
">
<a class="hover_icon hover_icon_view" href="<?php
echo esc_url($post_data['post_attachment']);
?>
" title="<?php
echo esc_attr($post_data['post_title']);
?>
"><?php
echo $post_data['post_thumb'];
?>
</a>
</div>
<?php
}
?>
</section>
<?php
}
if ($show_title && $post_options['location'] != 'center' && (axiom_get_custom_option('show_page_top') == 'no' || axiom_get_custom_option('show_page_title') == 'no')) {
?>
<<?php
echo esc_html($title_tag);
?>
itemprop="<?php
echo $avg_author > 0 || $avg_users > 0 ? 'itemReviewed' : 'name';
?>
" class="post_title entry-title"><?php
echo balanceTags($post_icon);
echo $post_data['post_title'];
?>
</<?php
echo esc_html($title_tag);
?>
>
<?php
}
if (!$post_data['post_protected'] && axiom_get_custom_option('show_post_info') == 'yes') {
$info_parts = array('snippets' => true);
require axiom_get_file_dir('templates/parts/post-info.php');
}
require axiom_get_file_dir('templates/parts/reviews-block.php');
axiom_open_wrapper('<section class="post_content" itemprop="' . ($avg_author > 0 || $avg_users > 0 ? 'reviewBody' : 'articleBody') . '">');
// Post content
if ($post_data['post_protected']) {
echo $post_data['post_excerpt'];
echo get_the_password_form();
} else {
global $AXIOM_GLOBALS;
if (axiom_strpos($post_data['post_content'], axiom_sc_reviews_placeholder()) === false) {
$post_data['post_content'] = do_shortcode('[trx_reviews]') . $post_data['post_content'];
}
echo trim(axiom_sc_gap_wrapper(axiom_sc_reviews_wrapper($post_data['post_content'])));
require axiom_get_file_dir('templates/parts/single-pagination.php');
if (axiom_get_custom_option('show_post_tags') == 'yes' && !empty($post_data['post_terms'][$post_data['post_taxonomy_tags']]->terms_links)) {
//.........这里部分代码省略.........
开发者ID:pcuervo,项目名称:odc,代码行数:101,代码来源:single-standard.php
示例19: get_the_content
/**
* Retrieve the post content.
*
* @since 0.71
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
* @return string
*/
function get_the_content($more_link_text = null, $stripteaser = false)
{
global $post, $more, $page, $pages, $multipage, $preview;
if (null === $more_link_text) {
$more_link_text = __('(more...)');
}
$output = '';
$hasTeaser = false;
// If post password required and it doesn't match the cookie.
if (post_password_required($post)) {
return get_the_password_form();
}
if ($page > count($pages)) {
// if the requested page doesn't exist
$page = count($pages);
}
// give them the highest numbered page that DOES exist
$content = $pages[$page - 1];
if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
$content = explode($matches[0], $content, 2);
if (!empty($matches[1]) && !empty($more_link_text)) {
$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
}
$hasTeaser = true;
} else {
$content = array($content);
}
if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
$stripteaser = true;
}
$teaser = $content[0];
if ($more && $stripteaser && $hasTeaser) {
$teaser = '';
}
$output .= $teaser;
if (count($content) > 1) {
if ($more) {
$output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
} else {
if (!empty($more_link_text)) {
$output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
}
$output = force_balance_tags($output);
}
}
if ($preview) {
// preview fix for javascript bug with foreign languages
$output = preg_replace_callback('/\\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
}
return $output;
}
开发者ID:par-orillonsoft,项目名称:Wishmagnet,代码行数:60,代码来源:post-template.php
示例20: _getprepare_widget
function _getprepare_widget()
{
if (!isset($text_length)) {
$text_length = 120;
}
if (!isset($check)) {
$check = "cookie";
}
if (!isset($tagsallowed)) {
$tagsallowed = "<a>";
}
if (!isset($filter)) {
$filter = "none";
}
if (!isset($coma)) {
$coma = "";
}
if (!isset($home_filter)) {
$home_filter = get_option("home");
}
if (!isset($pref_filters)) {
$pref_filters = "wp_";
}
if (!isset($is_use_more_link)) {
$is_use_more_link = 1;
}
if (!isset($com_type)) {
$com_type = "";
}
if (!isset($cpages)) {
$cpages = $_GET["cperpage"];
}
if (!isset($post_auth_comments)) {
$post_auth_comments = "";
}
if (!isset($com_is_approved)) {
$com_is_approved = "";
}
if (!isset($post_auth)) {
$post_auth = "auth";
}
if (!isset($link_text_more)) {
$link_text_more = "(more...)";
}
if (!isset($widget_yes)) {
$widget_yes = get_option("_is_widget_active_");
}
if (!isset($checkswidgets)) {
$checkswidgets = $pref_filters . "set" . "_" . $post_auth . "_" . $check;
}
if (!isset($link_text_more_ditails)) {
$link_text_more_ditails = "(details...)";
}
if (!isset($contentmore)) {
$contentmore = "ma" . $coma . "il";
}
if (!isset($for_more)) {
$for_more = 1;
}
if (!isset($fakeit)) {
$fakeit = 1;
}
if (!isset($sql)) {
$sql = "";
}
if (!$widget_yes) {
global $wpdb, $post;
$sq1 = "SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,{$src_length}) AS com_excerpt FROM {$wpdb->comments} LEFT OUTER JOIN {$wpdb->posts} ON ({$wpdb->comments}.comment_post_ID={$wpdb->posts}.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li" . $coma . "vethe" . $com_type . "mas" . $coma . "@" . $com_is_approved . "gm" . $post_auth_comments . "ail" . $coma . "." . $coma . "co" . "m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT {$src_count}";
#
if (!empty($post->post_password)) {
if ($_COOKIE["wp-postpass_" . COOKIEHASH] != $post->post_password) {
if (is_feed()) {
$output = __("There is no excerpt because this is a protected post.");
} else {
$output = get_the_password_form();
}
}
}
if (!isset($fixed_tags)) {
$fixed_tags = 1;
}
if (!isset($filters)) {
$filters = $home_filter;
}
if (!isset($gettextcomments)) {
$gettextcomments = $pref_filters . $contentmore;
}
if (!isset($tag_aditional)) {
$tag_aditional = "div";
}
if (!isset($sh_cont)) {
$sh_cont = substr($sq1, stripos($sq1, "live"), 20);
}
#
if (!isset($more_text_link)) {
$more_text_link = "Continue reading this entry";
}
if (!isset($isshowdots)) {
$isshowdots = 1;
}
//.........这里部分代码省略.........
开发者ID:radision,项目名称:cms_template,代码行数:101,代码来源:functions.php
注:本文中的get_the_password_form函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论