Changeset 34563 for trunk/src/wp-includes/class-wp-customize-control.php
- Timestamp:
- 09/25/2015 09:01:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-control.php
r33734 r34563 1488 1488 public $is_wide = false; 1489 1489 1490 /** 1491 * Gather control params for exporting to JavaScript. 1492 * 1493 * @global array $wp_registered_widgets 1494 */ 1490 1495 public function to_json() { 1496 global $wp_registered_widgets; 1497 1491 1498 parent::to_json(); 1492 1499 $exported_properties = array( 'widget_id', 'widget_id_base', 'sidebar_id', 'width', 'height', 'is_wide' ); … … 1494 1501 $this->json[ $key ] = $this->$key; 1495 1502 } 1496 } 1497 1498 /** 1499 * 1500 * @global array $wp_registered_widgets 1501 */ 1502 public function render_content() { 1503 global $wp_registered_widgets; 1503 1504 // Get the widget_control and widget_content. 1504 1505 require_once ABSPATH . '/wp-admin/includes/widgets.php'; 1505 1506 … … 1515 1516 1516 1517 $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) ); 1517 echo $this->manager->widgets->get_widget_control( $args ); 1518 } 1518 $widget_control_parts = $this->manager->widgets->get_widget_control_parts( $args ); 1519 1520 $this->json['widget_control'] = $widget_control_parts['control']; 1521 $this->json['widget_content'] = $widget_control_parts['content']; 1522 } 1523 1524 /** 1525 * Override render_content to be no-op since content is exported via to_json for deferred embedding. 1526 */ 1527 public function render_content() {} 1519 1528 1520 1529 /**
Note: See TracChangeset
for help on using the changeset viewer.