Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: feed_links_extra_show_post_type_archive_feed

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3204           }
3205      } elseif ( is_post_type_archive() ) {
3206           /**
3207            * Filters whether to display the post type archive feed link.
3208            *
3209            * @since 6.1.0
3210            *
3211            * @param bool $show Whether to display the post type archive feed link. Default true.
3212            */
3213           $show_post_type_archive_feed = apply_filters( 'feed_links_extra_show_post_type_archive_feed', true );
3214
3215           if ( $show_post_type_archive_feed ) {
3216                $post_type = get_query_var( 'post_type' );
3217
3218                if ( is_array( $post_type ) ) {
3219                     $post_type = reset( $post_type );
3220                }
3221
3222                $post_type_obj = get_post_type_object( $post_type );