WordPress.org

Make WordPress Core

Changeset 20649


Ignore:
Timestamp:
04/30/2012 05:20:32 PM (6 years ago)
Author:
koopersmith
Message:

Theme Customizer: Pass the WP_Customize instance to all actions fired inside the class. Plugins/themes should not refer to the $wp_customize global. see #19910, #20448.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize.php

    r20645 r20649  
    112112        add_filter( 'pre_option_template_root', array( $this, 'get_template_root' ) );
    113113
    114         do_action( 'start_previewing_theme' );
     114        do_action( 'start_previewing_theme', $this );
    115115    }
    116116
     
    140140        remove_filter( 'pre_option_template_root', array( $this, 'get_template_root' ) );
    141141
    142         do_action( 'stop_previewing_theme' );
     142        do_action( 'stop_previewing_theme', $this );
    143143    }
    144144
     
    149149     */
    150150    public function wp_loaded() {
    151         do_action( 'customize_register' );
     151        do_action( 'customize_register', $this );
    152152
    153153        if ( $this->is_preview() && ! is_admin() )
     
    188188        }
    189189
    190         do_action( 'customize_preview_init' );
     190        do_action( 'customize_preview_init', $this );
    191191    }
    192192
     
    335335        }
    336336
    337         do_action( 'customize_save' );
     337        do_action( 'customize_save', $this );
    338338
    339339        foreach ( $this->settings as $setting ) {
Note: See TracChangeset for help on using the changeset viewer.