Widget Customizer: Convert static WP_Customize_Widgets class into instantiated class and merge Options_Transaction into WP_Customize_Widgets.
see #27504. props westonruter. git-svn-id: https://develop.svn.wordpress.org/trunk@27816 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
76a167ac5f
commit
2d4b606e14
@ -1588,7 +1588,8 @@ function wp_ajax_save_widget() {
|
||||
}
|
||||
|
||||
function wp_ajax_update_widget() {
|
||||
WP_Customize_Widgets::wp_ajax_update_widget();
|
||||
global $wp_customize;
|
||||
$wp_customize->widgets->wp_ajax_update_widget();
|
||||
}
|
||||
|
||||
function wp_ajax_upload_attachment() {
|
||||
|
@ -1080,7 +1080,7 @@ class WP_Widget_Form_Customize_Control extends WP_Customize_Control {
|
||||
);
|
||||
|
||||
$args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) );
|
||||
echo WP_Customize_Widgets::get_widget_control( $args );
|
||||
echo $this->manager->widgets->get_widget_control( $args );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,13 @@ final class WP_Customize_Manager {
|
||||
*/
|
||||
protected $previewing = false;
|
||||
|
||||
/**
|
||||
* Methods and properties deailing with managing widgets in the customizer.
|
||||
*
|
||||
* @var WP_Customize_Widgets
|
||||
*/
|
||||
public $widgets;
|
||||
|
||||
protected $settings = array();
|
||||
protected $sections = array();
|
||||
protected $controls = array();
|
||||
@ -63,7 +70,7 @@ final class WP_Customize_Manager {
|
||||
require( ABSPATH . WPINC . '/class-wp-customize-control.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp-customize-widgets.php' );
|
||||
|
||||
WP_Customize_Widgets::setup(); // This should be integrated.
|
||||
$this->widgets = new WP_Customize_Widgets( $this );
|
||||
|
||||
add_filter( 'wp_die_handler', array( $this, 'wp_die_handler' ) );
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user