widget_meta_poweredby хук-фильтрWP 3.6.0

Filters the "WordPress.org" list item HTML in the Meta widget.

Использование

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(строка)
Default HTML for the WordPress.org list item.
$instance(массив)
Array of settings for the current widget.

Список изменений

С версии 3.6.0 Введена.
С версии 4.9.0 Added the $instance parameter.

Где вызывается хук

WP_Widget_Meta::widget()
widget_meta_poweredby
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
);

Где используется хук в WordPress

Использование не найдено.