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 |
---|---|
3121 | } |
3122 |
|
3123 | /** |
3124 | * Filters whether to display the comments feed link. |
3125 | * |
3126 | * @since 4.4.0 |
3127 | * |
3128 | * @param bool $show Whether to display the comments feed link. Default true. |
3129 | */ |
3130 | if ( apply_filters( 'feed_links_show_comments_feed', true ) ) { |
3131 | printf( |
3132 | '<link rel="alternate" type="%s" title="%s" href="%s" />' . "\n", |
3133 | feed_content_type(), |
3134 | esc_attr( sprintf( $args['comstitle'], get_bloginfo( 'name' ), $args['separator'] ) ), |
3135 | esc_url( get_feed_link( 'comments_' . get_default_feed() ) ) |
3136 | ); |
3137 | } |
3138 | } |
3139 |
|
Line | Code |
3165 | ); |
3166 |
|
3167 | $args = wp_parse_args( $args, $defaults ); |
3168 |
|
3169 | if ( is_singular() ) { |
3170 | $id = 0; |
3171 | $post = get_post( $id ); |
3172 |
|
3173 | /** This filter is documented in wp-includes/general-template.php */ |
3174 | $show_comments_feed = apply_filters( 'feed_links_show_comments_feed', true ); |
3175 |
|
3176 | /** |
3177 | * Filters whether to display the post comments feed link. |
3178 | * |
3179 | * This filter allows to enable or disable the feed link for a singular post |
3180 | * in a way that is independent of {@see 'feed_links_show_comments_feed'} |
3181 | * (which controls the global comments feed). The result of that filter |
3182 | * is accepted as a parameter. |
3183 | * |