WordPress.org

Make WordPress Core

Ticket #27619: 27619.patch

File 27619.patch, 3.0 KB (added by ocean90, 4 years ago)
  • src/wp-includes/class-wp-customize-widgets.php

     
    7878                add_action( 'after_setup_theme',                       array( $this, 'setup_widget_addition_previews' ) );
    7979                add_action( 'customize_controls_init',                 array( $this, 'customize_controls_init' ) );
    8080                add_action( 'customize_register',                      array( $this, 'schedule_customize_register' ), 1 );
    81                 add_action( 'customize_controls_enqueue_scripts',      array( $this, 'customize_controls_enqueue_deps' ) );
     81                add_action( 'customize_controls_enqueue_scripts',      array( $this, 'enqueue_scripts' ) );
     82                add_action( 'customize_controls_print_styles',         array( $this, 'print_styles' ) );
     83                add_action( 'customize_controls_print_scripts',        array( $this, 'print_scripts' ) );
     84                add_action( 'customize_controls_print_footer_scripts', array( $this, 'print_footer_scripts' ) );
    8285                add_action( 'customize_controls_print_footer_scripts', array( $this, 'output_widget_control_templates' ) );
    8386                add_action( 'customize_preview_init',                  array( $this, 'customize_preview_init' ) );
    8487
     
    517520        }
    518521
    519522        /**
     523         * Call admin_print_styles-widgets.php and admin_print_styles hooks.
     524         *
     525         * @since 3.9.0
     526         * @access public
     527         */
     528        public function print_styles() {
     529                /** This action is documented in wp-admin/admin-header.php */
     530                do_action( 'admin_print_styles-widgets.php' );
     531
     532                /** This action is documented in wp-admin/admin-header.php */
     533                do_action( 'admin_print_styles' );
     534        }
     535
     536        /**
     537         * Call admin_print_scripts-widgets.php and admin_print_scripts hooks.
     538         *
     539         * @since 3.9.0
     540         * @access public
     541         */
     542        public function print_scripts() {
     543                /** This action is documented in wp-admin/admin-header.php */
     544                do_action( 'admin_print_scripts-widgets.php' );
     545
     546                /** This action is documented in wp-admin/admin-header.php */
     547                do_action( 'admin_print_scripts' );
     548        }
     549
     550        /**
    520551         * Enqueue scripts and styles for customizer panel and export data to JS.
    521552         *
    522553         * @since 3.9.0
    523554         * @access public
    524555         */
    525         public function customize_controls_enqueue_deps() {
     556        public function enqueue_scripts() {
     557                /** This action is documented in wp-admin/admin-header.php */
     558                do_action( 'admin_enqueue_scripts', 'widgets.php' );
     559
    526560                wp_enqueue_style( 'customize-widgets' );
    527561                wp_enqueue_script( 'customize-widgets' );
    528562
     
    594628        }
    595629
    596630        /**
     631         * Call admin_print_footer_scripts and admin_print_scripts hooks.
     632         *
     633         * @since 3.9.0
     634         * @access public
     635         */
     636        public function print_footer_scripts() {
     637                /** This action is documented in wp-admin/admin-footer.php */
     638                do_action( 'admin_print_footer_scripts' );
     639
     640                /** This action is documented in wp-admin/admin-footer.php */
     641                do_action( 'admin_footer-widgets.php' );
     642        }
     643
     644        /**
    597645         * Render the widget form control templates into the DOM so that plugin scripts can manipulate them
    598646         *
    599647         * @since 3.9.0