widget_meta_poweredby
Filter HookDescription
Filters the "WordPress.org" list item HTML in the Meta widget.Hook Information
File Location |
wp-includes/widgets/class-wp-widget-meta.php
View on GitHub
|
Hook Type | Filter |
Line Number | 87 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$html
|
Default HTML for the WordPress.org list item. |
array
|
$instance
|
Array of settings for the current widget. |
Usage Examples
Basic Usage
<?php
// Hook into widget_meta_poweredby
add_filter('widget_meta_poweredby', 'my_custom_filter', 10, 2);
function my_custom_filter($html, $instance) {
// Your custom filtering logic here
return $html;
}
Source Code Context
wp-includes/widgets/class-wp-widget-meta.php:87
- How this hook is used in WordPress core
<?php
82 * @since 4.9.0 Added the `$instance` parameter.
83 *
84 * @param string $html Default HTML for the WordPress.org list item.
85 * @param array $instance Array of settings for the current widget.
86 */
87 echo apply_filters(
88 'widget_meta_poweredby',
89 sprintf(
90 '<li><a href="%1$s">%2$s</a></li>',
91 esc_url( __( 'https://wordpress.org/' ) ),
92 __( 'WordPress.org' )
PHP Documentation
<?php
/**
* Filters the "WordPress.org" list item HTML in the Meta widget.
*
* @since 3.6.0
* @since 4.9.0 Added the `$instance` parameter.
*
* @param string $html Default HTML for the WordPress.org list item.
* @param array $instance Array of settings for the current widget.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/widgets/class-wp-widget-meta.php
Related Hooks
Related hooks will be displayed here in future updates.