rss_widget_feed_link
Filters the classic RSS widget's feed icon link.
Themes can remove the icon link by using add_filter( [rss_widget_feed_link](/hook/rss_widget_feed_link),'__return_empty_string');.
Использование
add_filter( 'rss_widget_feed_link', 'wp_kama_rss_widget_feed_link_filter', 10, 2 ); /** * Function for `rss_widget_feed_link` filter-hook. * * @param string|false $feed_link HTML for link to RSS feed. * @param array $instance Array of settings for the current widget. * * @return string|false */ function wp_kama_rss_widget_feed_link_filter( $feed_link, $instance ){ // filter... return $feed_link; }
- $feed_link(строка|false)
- HTML for link to RSS feed.
- $instance(массив)
- Array of settings for the current widget.
Список изменений
С версии 5.9.0 | Введена. |
Где вызывается хук
wp-includes/widgets/class-wp-widget-rss.php 111
$feed_link = apply_filters( 'rss_widget_feed_link', $feed_link, $instance );