W3cubDocs

/WordPress

WP_Widget_Block::set_is_wide_widget_in_customizer( bool $is_wide, string $widget_id ): bool

Makes sure no block widget is considered to be wide.

Parameters

$is_wideboolrequired
Whether the widget is considered wide.
$widget_idstringrequired
Widget ID.

Return

bool Updated is_wide value.

Source

public function set_is_wide_widget_in_customizer( $is_wide, $widget_id ) {
	if ( str_starts_with( $widget_id, 'block-' ) ) {
		return false;
	}

	return $is_wide;
}

Changelog

Version Description
5.8.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_widget_block/set_is_wide_widget_in_customizer