wppaste
WordPress

WP_Widget_Form_Customize_Control

Since
3.9.0
Source
wp-includes/customize/class-wp-widget-form-customize-control.php:17
Widget Form Customize Control class.

Compatibility

WordPress
since 3.9.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 8

$typestringpublic
Customize control type.
$widget_idstringpublic
Widget ID.
$widget_id_basestringpublic
Widget ID base.
$sidebar_idstringpublic
Sidebar ID.
$is_newboolpublic
Widget status.
$widthintpublic
Widget width.
$heightintpublic
Widget height.
$is_wideboolpublic
Widget mode.

Methods · 3

  • to_json()Gather control params for exporting to JavaScript.
  • render_content()Override render_content to be no-op since content is exported via to_json for deferred embedding.
  • active_callback()Whether the current widget is rendered on the page.

Source code

class WP_Widget_Form_Customize_Control extends WP_Customize_Control {	/**	 * Customize control type.	 *	 * @since 3.9.0	 * @var string	 */	public $type = 'widget_form'; 	/**	 * Widget ID.	 *	 * @since 3.9.0	 * @var string	 */	public $widget_id; 	/**	 * Widget ID base.	 *	 * @since 3.9.0	 * @var string	 */	public $widget_id_base; 	/**	 * Sidebar ID.	 *	 * @since 3.9.0	 * @var string	 */	public $sidebar_id; 	/**	 * Widget status.	 *	 * @since 3.9.0	 * @var bool True if new, false otherwise. Default false.	 */	public $is_new = false; 	/**	 * Widget width.	 *	 * @since 3.9.0	 * @var int	 */	public $width; 	/**	 * Widget height.	 *	 * @since 3.9.0	 * @var int	 */	public $height; 	/**	 * Widget mode.	 *	 * @since 3.9.0	 * @var bool True if wide, false otherwise. Default false.	 */	public $is_wide = false; 	/**	 * Gather control params for exporting to JavaScript.	 *	 * @since 3.9.0	 *	 * @global array $wp_registered_widgets	 */	public function to_json() {		global $wp_registered_widgets; 		parent::to_json();		$exported_properties = array( 'widget_id', 'widget_id_base', 'sidebar_id', 'width', 'height', 'is_wide' );		foreach ( $exported_properties as $key ) {			$this->json[ $key ] = $this->$key;		}

Changelog

Introduced in 3.9.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/customize/class-wp-widget-form-customize-control.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.