WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
3115 | } |
3116 |
|
3117 | /** |
3118 | * Filters whether to display the comments feed link. |
3119 | * |
3120 | * @since 4.4.0 |
3121 | * |
3122 | * @param bool $show Whether to display the comments feed link. Default true. |
3123 | */ |
3124 | if ( apply_filters( 'feed_links_show_comments_feed', true ) ) { |
3125 | printf( |
3126 | '<link rel="alternate" type="%s" title="%s" href="%s" />' . "\n", |
3127 | feed_content_type(), |
3128 | esc_attr( sprintf( $args['comstitle'], get_bloginfo( 'name' ), $args['separator'] ) ), |
3129 | esc_url( get_feed_link( 'comments_' . get_default_feed() ) ) |
3130 | ); |
3131 | } |
3132 | } |
3133 |
|
Line | Code |
3159 | ); |
3160 |
|
3161 | $args = wp_parse_args( $args, $defaults ); |
3162 |
|
3163 | if ( is_singular() ) { |
3164 | $id = 0; |
3165 | $post = get_post( $id ); |
3166 |
|
3167 | /** This filter is documented in wp-includes/general-template.php */ |
3168 | $show_comments_feed = apply_filters( 'feed_links_show_comments_feed', true ); |
3169 |
|
3170 | /** |
3171 | * Filters whether to display the post comments feed link. |
3172 | * |
3173 | * This filter allows to enable or disable the feed link for a singular post |
3174 | * in a way that is independent of {@see 'feed_links_show_comments_feed'} |
3175 | * (which controls the global comments feed). The result of that filter |
3176 | * is accepted as a parameter. |
3177 | * |