is_wide_widget_in_customizer
Filters whether the given widget is considered "wide".
Использование
add_filter( 'is_wide_widget_in_customizer', 'wp_kama_is_wide_widget_in_customizer_filter', 10, 2 );
/**
* Function for `is_wide_widget_in_customizer` filter-hook.
*
* @param bool $is_wide Whether the widget is wide, Default false.
* @param string $widget_id Widget ID.
*
* @return bool
*/
function wp_kama_is_wide_widget_in_customizer_filter( $is_wide, $widget_id ){
// filter...
return $is_wide;
}
- $is_wide(true|false)
- Whether the widget is wide, Default false.
- $widget_id(строка)
- Widget ID.
Список изменений
| С версии 3.9.0 | Введена. |
Где вызывается хук
is_wide_widget_in_customizer
wp-includes/class-wp-customize-widgets.php 615
return apply_filters( 'is_wide_widget_in_customizer', $is_wide, $widget_id );
Где используется хук в WordPress
wp-includes/widgets/class-wp-widget-block.php 47
add_filter( 'is_wide_widget_in_customizer', array( $this, 'set_is_wide_widget_in_customizer' ), 10, 2 );