if( ! isset($wp_query)){ _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' ); return false; }
return$wp_query->is_single($post); }
/**
* Determines whether the query is for an existing single post of any post type
* (post, attachment, page, custom post types).
*
* If the $post_types parameter is specified, this function will additionally
* check if the query is for one of the Posts Types specified.
*
* For more information on this and similar theme functions, check out
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
* Conditional Tags} article in the Theme Developer Handbook.
*
* @since 1.5.0
*
* @see is_page()
* @see is_single()
* @global WP_Query $wp_query WordPress Query object.
*
* @param string|string[] $post_types Optional. Post type or array of post types
* to check against. Default empty.
* @return bool Whether the query is for an existing single post
* or any of the given post types.
*/
/**
* Displays the relational link for the next post adjacent to the current post.
*
* @since 2.8.0
*
* @see get_adjacent_post_rel_link()
*
* @param string $title Optional. Link title format. Default '%title'.
* @param bool $in_same_term Optional. Whether link should be in the same taxonomy term.
* Default false.
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
* Default empty.
* @param string $taxonomy Optional. Taxonomy, if `$in_same_term` is true. Default 'category'.
*/
functiontwenty_twenty_one_entry_meta_footer(){
// Early exit if not a post.
if( 'post' !== get_post_type()){ return; }
// Hide meta information on pages.
if( ! is_single()){
if( ! isset($post_id) || ! (int)$post_id){ trackback_response( 1, __( 'I really need an ID for this to work.' )); }
if(empty($title) && empty($trackback_url) && empty($blog_name)){ // If it doesn't look like a trackback at all.
wp_redirect(get_permalink($post_id)); exit; }
/*
* Force full post content when viewing the permalink for the $post,
* or when on an RSS feed. Otherwise respect the 'more' tag.
*/ if(get_queried_object_id() === $post->ID &&($this->is_page() || $this->is_single())){ $more = 1; }elseif($this->is_feed()){ $more = 1; }else{ $more = 0; }