widget_meta_poweredby
Filters the "WordPress.org" list item HTML in the Meta widget.
Usage
add_filter( 'widget_meta_poweredby', 'wp_kama_widget_meta_poweredby_filter', 10, 2 ); /** * Function for `widget_meta_poweredby` filter-hook. * * @param string $html Default HTML for the WordPress.org list item. * @param array $instance Array of settings for the current widget. * * @return string */ function wp_kama_widget_meta_poweredby_filter( $html, $instance ){ // filter... return $html; }
- $html(string)
- Default HTML for the WordPress.org list item.
- $instance(array)
- Array of settings for the current widget.
Changelog
Since 3.6.0 | Introduced. |
Since 4.9.0 | Added the $instance parameter. |
Where the hook is called
wp-includes/widgets/class-wp-widget-meta.php 87-95
echo apply_filters( 'widget_meta_poweredby', sprintf( '<li><a href="%1$s">%2$s</a></li>', esc_url( __( 'https://wordpress.org/' ) ), __( 'WordPress.org' ) ), $instance );