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); }
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>'; } }
/** * 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. */ }
function italystrap_excerpt_password_form($excerpt) { if (post_password_required()) { $excerpt = get_the_password_form(); } return $excerpt; }
/** * 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 }
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(); }
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>"; } }
/** * 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>' // ); }
/** * 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;">, </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>' );*/ }
/** * 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 }
/** * 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 }
/** * 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 } }
/** * 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; }
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() }
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'); } }
/** * 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>'; } }
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); } }
/** * 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>'; } }
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"; }); }
/** * 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() }
/** * Prints HTML with meta information for the categories, tags and comments. */ function ving_entry_footer() { global $wp_query; // 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__(', ', 'ving')); if ($categories_list && ving_categorized_blog()) { $post = $wp_query->post; $cat = wp_get_post_terms($post->ID, 'category'); $count = count($cat); if ($count > 1) { printf('<span class="cat-links col-lg-6 col-md-6 col-sm-6 col-xs-12"><span class="text">CATEGORIES</span>' . esc_html__('%1$s', 'ving') . '</span>', $categories_list); // WPCS: XSS OK. } else { printf('<span class="cat-links col-lg-6 col-md-6 col-sm-6 col-xs-12"><span class="text">CATEGORY</span>' . esc_html__('%1$s', 'ving') . '</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__(', ', 'ving')); if ($tags_list) { printf('<span class="tags-links col-lg-5 col-md-5 col-sm-5 col-xs-12"><span class="text">TAGS</span>' . esc_html__('%1$s', 'ving') . '</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', 'ving'), esc_html__('1 Comment', 'ving'), esc_html__('% Comments', 'ving')); echo '</span>'; } edit_post_link(sprintf(esc_html__('Edit %s', 'ving'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>'); }
/** * The default template for displaying content * * Used for both single and index/archive/search. * * @package WordPress * @subpackage Twenty_Fifteen * @since Twenty Fifteen 1.0 */ function twentyfifteen_post_thumbnail() { if (post_password_required() || is_attachment() || !has_post_thumbnail()) { return; } if (is_singular()) { ?> <div class="post-thumbnail"> <?php the_post_thumbnail(); ?> </div><!-- .post-thumbnail --> <?php } else { ?> <a class="post-thumbnail" href="<?php the_permalink(); ?> " aria-hidden="true"> <?php the_post_thumbnail('post-thumbnail', array('alt' => get_the_title())); ?> </a> <?php } // End is_singular() }
function widget($args, $instance) { global $post; extract($args, EXTR_SKIP); // don't execute widget if the comic is disabled on the home page and/or the site is paged if ((is_home() || is_front_page()) && (is_paged() || ceo_pluginfo('disable_comic_on_home_page'))) { return; } if (post_password_required($post)) { return; } // This section allows the plugin to work in any sidebar even on home, except (paged) files if ((is_home() || is_front_page()) && !is_paged() && !ceo_pluginfo('disable_comic_on_home_page')) { $order = ceo_pluginfo('display_first_comic_on_home_page') ? 'asc' : 'desc'; $args = array('showposts' => 1, 'posts_per_page' => 1, 'order' => $order, 'post_type' => 'comic'); $posts = get_posts($args); $post = reset($posts); } echo $before_widget; $title = apply_filters('widget_title', $instance['title']); if ($title) { echo $before_title . $title . $after_title; } $post_characters = get_the_terms($post->ID, 'characters'); ?> <div class="castrefwidget-wrapper"><?php foreach ($post_characters as $mychar) { $out[] = '<span class="castrefwidget-line casthover-hovercard-hook"><a href="' . get_term_link($mychar->slug, 'characters') . '"><div class="castrefwidget-block character-' . $mychar->slug . '"></div></a>' . ceo_insert_character_hovercard($mychar->slug) . '</span>'; } echo join('', $out); ?> </div><?php echo $after_widget; wp_reset_query(); }
function selenenw_post_thumbnail() { if (post_password_required() || is_attachment() || !has_post_thumbnail()) { return; } if (is_singular()) { ?> <div class="entry-featured"> <?php the_post_thumbnail(); ?> </div><!-- .post-thumbnail --> <?php } else { ?> <figure> <a href="<?php the_permalink(); ?> "> <?php the_post_thumbnail('post-thumbnail', array('alt' => get_the_title())); ?> </a> </figure> <?php } // End is_singular() }
/** * Prints HTML with meta information for the current post-date/time and author. */ function pleiadesweb_posted_on() { // 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())); $posted_on = sprintf('<i class="fa fa-calendar"></i>' . esc_html_x(' %s', 'post date', 'pleiadesweb'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>'); // AUTHOR $byline = sprintf(esc_html_x('| escrito por %s', 'post author', 'pleiadesweb'), '<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>'; // CATEGORIES /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'pleiadesweb')); if ($categories_list && pleiadesweb_categorized_blog()) { echo ' | </i><span class="category-list">' . $categories_list . '</span>'; } // COMMENTS if (!post_password_required() && (comments_open() || '0' != get_comments_number())) { echo ' | <span class="comments-link">'; comments_popup_link(__('Deja un comentario', 'my-simone'), __('1 comentario', 'my-simone'), __('% comentarios', 'my-simone')); echo '</span>'; } //!post_password_required() }
function gabfire_media($parameters) { if (!post_password_required()) { global $post, $gab_video, $gab_thumb, $gab_flv, $gab_iframe; $gab_thumb = get_post_meta($post->ID, 'thumbnail', true); $gab_flv = get_post_meta($post->ID, 'videoflv', true); $gab_iframe = get_post_meta($post->ID, 'iframe', true); /* If we have installed and activated Gabfire Media Plugin */ if (function_exists('gabfire_mediaplugin_thumbnail')) { if ($gab_flv != '' and $parameters['enable_video'] == 1) { gabfire_mediaplugin_localvideo($parameters); } elseif ($gab_iframe != '' and $parameters['enable_video'] == 1) { gabfire_mediaplugin_oembedvideo($parameters); } elseif (has_post_thumbnail() and $parameters['enable_thumb'] == 1) { gabfire_mediaplugin_thumbnail($parameters); } elseif ($parameters['enable_default'] == 1) { gabfire_mediaplugin_default($parameters); } } else { if ($gab_iframe != '' and $parameters['enable_video'] == 1) { gabfire_call_iframe($parameters); } elseif (has_post_thumbnail() and $parameters['enable_thumb'] == 1) { gabfire_call_post_thumb($parameters); } elseif ($parameters['enable_default'] == 1) { gabfire_call_default_thumb($parameters); } } } }
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); }
function the_content($content) { global $post, $EM_Event; if ($post->post_type == EM_POST_TYPE_EVENT) { if (is_archive() || is_search()) { if (get_option('dbem_cp_events_archive_formats')) { $EM_Event = em_get_event($post); $content = $EM_Event->output(get_option('dbem_event_list_item_format')); } } else { if (get_option('dbem_cp_events_formats') && !post_password_required()) { $EM_Event = em_get_event($post); ob_start(); em_locate_template('templates/event-single.php', true); $content = ob_get_clean(); } else { $EM_Event = em_get_event($post); if ($EM_Event->event_rsvp) { $content .= $EM_Event->output('<h2>Bookings</h2>#_BOOKINGFORM'); } } } } return $content; }
function fart_post_classes($classes) { if (!post_password_required() && !is_attachment() && has_post_thumbnail()) { $classes[] = 'has-post-thumbnail'; } return $classes; }
/** * Prints HTML with meta information for the categories, tags and comments. */ function xmaps_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__(', ', 'xmaps')); if ($categories_list && xmaps_categorized_blog()) { printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'xmaps') . '</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__(', ', 'xmaps')); if ($tags_list) { printf('<span class="tags-links">' . esc_html__('Tagged %1$s', 'xmaps') . '</span>', $tags_list); // WPCS: XSS OK. } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; /* translators: %s: post title */ comments_popup_link(sprintf(wp_kses(__('Leave a Comment<span class="screen-reader-text"> on %s</span>', 'xmaps'), array('span' => array('class' => array()))), get_the_title())); echo '</span>'; } edit_post_link(sprintf(esc_html__('Edit %s', 'xmaps'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>'); }