mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-06 21:54:28 +00:00
Customizer: Change instances of "Theme Customizer" to just "Customizer", as the Customizer isn't necessarily theme-specific.
Also capitalize "Customizer". See also https://make.wordpress.org/core/2014/07/08/customizer-improvements-in-4-0/. props studionashvegas, tareq1988. fixes #29947. git-svn-id: https://develop.svn.wordpress.org/trunk@29903 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -152,7 +152,7 @@ class WP_Customize_Control {
|
||||
public function enqueue() {}
|
||||
|
||||
/**
|
||||
* Check whether control is active to current customizer preview.
|
||||
* Check whether control is active to current Customizer preview.
|
||||
*
|
||||
* @since 4.0.0
|
||||
* @access public
|
||||
|
||||
@@ -37,7 +37,7 @@ final class WP_Customize_Manager {
|
||||
protected $previewing = false;
|
||||
|
||||
/**
|
||||
* Methods and properties deailing with managing widgets in the customizer.
|
||||
* Methods and properties deailing with managing widgets in the Customizer.
|
||||
*
|
||||
* @var WP_Customize_Widgets
|
||||
*/
|
||||
@@ -82,7 +82,7 @@ final class WP_Customize_Manager {
|
||||
// Run wp_redirect_status late to make sure we override the status last.
|
||||
add_action( 'wp_redirect_status', array( $this, 'wp_redirect_status' ), 1000 );
|
||||
|
||||
// Do not spawn cron (especially the alternate cron) while running the customizer.
|
||||
// Do not spawn cron (especially the alternate cron) while running the Customizer.
|
||||
remove_action( 'init', 'wp_cron' );
|
||||
|
||||
// Do not run update checks when rendering the controls.
|
||||
@@ -516,7 +516,7 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a signature so we can ensure the customizer was properly executed.
|
||||
* Prints a signature so we can ensure the Customizer was properly executed.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
@@ -525,7 +525,7 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the signature in case we experience a case where the customizer was not properly executed.
|
||||
* Removes the signature in case we experience a case where the Customizer was not properly executed.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
|
||||
@@ -116,7 +116,7 @@ final class WP_Customize_Widgets {
|
||||
/**
|
||||
* Set up widget addition previews.
|
||||
*
|
||||
* Since the widgets get registered on 'widgets_init' before the customizer
|
||||
* Since the widgets get registered on 'widgets_init' before the Customizer
|
||||
* settings are set up on 'customize_register', we have to filter the options
|
||||
* similarly to how the setting previewer will filter the options later.
|
||||
*
|
||||
@@ -146,7 +146,7 @@ final class WP_Customize_Widgets {
|
||||
return;
|
||||
}
|
||||
|
||||
// Input from customizer preview.
|
||||
// Input from Customizer preview.
|
||||
if ( isset( $_POST['customized'] ) ) {
|
||||
$this->_customized = json_decode( $this->get_post_value( 'customized' ), true );
|
||||
} else { // Input from ajax widget update request.
|
||||
@@ -201,7 +201,7 @@ final class WP_Customize_Widgets {
|
||||
/**
|
||||
* Ensure that newly-added widgets will appear in the widgets_sidebars.
|
||||
*
|
||||
* This is necessary because the customizer's setting preview filters
|
||||
* This is necessary because the Customizer's setting preview filters
|
||||
* are added after the widgets_init action, which is too late for the
|
||||
* widgets to be set up properly.
|
||||
*
|
||||
@@ -225,7 +225,7 @@ final class WP_Customize_Widgets {
|
||||
* Ensure newly-added widgets have empty instances so they
|
||||
* will be recognized.
|
||||
*
|
||||
* This is necessary because the customizer's setting preview
|
||||
* This is necessary because the Customizer's setting preview
|
||||
* filters are added after the widgets_init action, which is
|
||||
* too late for the widgets to be set up properly.
|
||||
*
|
||||
@@ -287,7 +287,7 @@ final class WP_Customize_Widgets {
|
||||
/**
|
||||
* Override sidebars_widgets for theme switch.
|
||||
*
|
||||
* When switching a theme via the customizer, supply any previously-configured
|
||||
* When switching a theme via the Customizer, supply any previously-configured
|
||||
* sidebars_widgets from the target theme as the initial sidebars_widgets
|
||||
* setting. Also store the old theme's existing settings so that they can
|
||||
* be passed along for storing in the sidebars_widgets theme_mod when the
|
||||
@@ -313,7 +313,7 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter old_sidebars_widgets_data customizer setting.
|
||||
* Filter old_sidebars_widgets_data Customizer setting.
|
||||
*
|
||||
* When switching themes, filter the Customizer setting
|
||||
* old_sidebars_widgets_data to supply initial $sidebars_widgets before they
|
||||
@@ -388,7 +388,7 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register customizer settings and controls for all sidebars and widgets.
|
||||
* Register Customizer settings and controls for all sidebars and widgets.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
@@ -534,7 +534,7 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
|
||||
/**
|
||||
* Covert a widget_id into its corresponding customizer setting ID (option name).
|
||||
* Covert a widget_id into its corresponding Customizer setting ID (option name).
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
@@ -556,9 +556,9 @@ final class WP_Customize_Widgets {
|
||||
* Determine whether the widget is considered "wide".
|
||||
*
|
||||
* Core widgets which may have controls wider than 250, but can
|
||||
* still be shown in the narrow customizer panel. The RSS and Text
|
||||
* still be shown in the narrow Customizer panel. The RSS and Text
|
||||
* widgets in Core, for example, have widths of 400 and yet they
|
||||
* still render fine in the customizer panel. This method will
|
||||
* still render fine in the Customizer panel. This method will
|
||||
* return all Core widgets as being not wide, but this can be
|
||||
* overridden with the is_wide_widget_in_customizer filter.
|
||||
*
|
||||
@@ -664,7 +664,7 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles for customizer panel and export data to JavaScript.
|
||||
* Enqueue scripts and styles for Customizer panel and export data to JavaScript.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
@@ -964,7 +964,7 @@ final class WP_Customize_Widgets {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add hooks for the customizer preview.
|
||||
* Add hooks for the Customizer preview.
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @access public
|
||||
@@ -982,7 +982,7 @@ final class WP_Customize_Widgets {
|
||||
* Because wp_get_sidebars_widgets() gets called early at init
|
||||
* (via wp_convert_widget_settings()) and can set global variable
|
||||
* $_wp_sidebars_widgets to the value of get_option( 'sidebars_widgets' )
|
||||
* before the customizer preview filter is added, we have to reset
|
||||
* before the Customizer preview filter is added, we have to reset
|
||||
* it after the filter has been added.
|
||||
*
|
||||
* @since 3.9.0
|
||||
@@ -1039,7 +1039,7 @@ final class WP_Customize_Widgets {
|
||||
*/
|
||||
public function export_preview_data() {
|
||||
|
||||
// Prepare customizer settings to pass to Javascript.
|
||||
// Prepare Customizer settings to pass to Javascript.
|
||||
$settings = array(
|
||||
'renderedSidebars' => array_fill_keys( array_unique( $this->rendered_sidebars ), true ),
|
||||
'renderedWidgets' => array_fill_keys( array_keys( $this->rendered_widgets ), true ),
|
||||
|
||||
@@ -16,7 +16,7 @@ window.wp = window.wp || {};
|
||||
* By default, any element in the body with the load-customize class will open
|
||||
* an iframe overlay with the URL specified.
|
||||
*
|
||||
* e.g. <a class="load-customize" href="<?php echo wp_customize_url(); ?>">Open customizer</a>
|
||||
* e.g. <a class="load-customize" href="<?php echo wp_customize_url(); ?>">Open Customizer</a>
|
||||
*
|
||||
* @augments wp.customize.Events
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ window.wp = window.wp || {};
|
||||
$('#wpbody').on( 'click', '.load-customize', function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
// Store a reference to the link that opened the customizer.
|
||||
// Store a reference to the link that opened the Customizer.
|
||||
Loader.link = $(this);
|
||||
// Load the theme.
|
||||
Loader.open( Loader.link.attr('href') );
|
||||
@@ -90,7 +90,7 @@ window.wp = window.wp || {};
|
||||
},
|
||||
|
||||
/**
|
||||
* Open the customizer overlay for a specific URL.
|
||||
* Open the Customizer overlay for a specific URL.
|
||||
*
|
||||
* @param string src URL to load in the Customizer.
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ window.wp = window.wp || {};
|
||||
this.active = true;
|
||||
this.body.addClass('customize-loading');
|
||||
|
||||
// Dirty state of customizer in iframe
|
||||
// Dirty state of Customizer in iframe
|
||||
this.saved = new api.Value( true );
|
||||
|
||||
this.iframe = $( '<iframe />', { src: src }).appendTo( this.element );
|
||||
@@ -170,7 +170,7 @@ window.wp = window.wp || {};
|
||||
},
|
||||
|
||||
/**
|
||||
* Callback after the customizer has been opened.
|
||||
* Callback after the Customizer has been opened.
|
||||
*/
|
||||
opened: function() {
|
||||
Loader.body.addClass( 'customize-active full-overlay-active' );
|
||||
@@ -184,7 +184,7 @@ window.wp = window.wp || {};
|
||||
return;
|
||||
}
|
||||
|
||||
// Display AYS dialog if customizer is dirty
|
||||
// Display AYS dialog if Customizer is dirty
|
||||
if ( ! this.saved() && ! confirm( Loader.settings.l10n.saveAlert ) ) {
|
||||
// Go forward since Customizer is exited by history.back()
|
||||
history.forward();
|
||||
@@ -202,7 +202,7 @@ window.wp = window.wp || {};
|
||||
},
|
||||
|
||||
/**
|
||||
* Callback after the customizer has been closed.
|
||||
* Callback after the Customizer has been closed.
|
||||
*/
|
||||
closed: function() {
|
||||
Loader.iframe.remove();
|
||||
|
||||
@@ -804,9 +804,9 @@ function switch_theme( $stylesheet ) {
|
||||
add_option( "theme_mods_$stylesheet", $default_theme_mods );
|
||||
} else {
|
||||
/*
|
||||
* Since retrieve_widgets() is called when initializing the customizer theme,
|
||||
* Since retrieve_widgets() is called when initializing a theme in the Customizer,
|
||||
* we need to to remove the theme mods to avoid overwriting changes made via
|
||||
* the widget customizer when accessing wp-admin/widgets.php.
|
||||
* the Customizer when accessing wp-admin/widgets.php.
|
||||
*/
|
||||
if ( 'wp_ajax_customize_save' === current_action() ) {
|
||||
remove_theme_mod( 'sidebars_widgets' );
|
||||
@@ -1946,7 +1946,7 @@ function _wp_customize_loader_settings() {
|
||||
add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
|
||||
|
||||
/**
|
||||
* Returns a URL to load the theme customizer.
|
||||
* Returns a URL to load the Customizer.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
@@ -1961,7 +1961,7 @@ function wp_customize_url( $stylesheet = null ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a script to check whether or not the customizer is supported,
|
||||
* Prints a script to check whether or not the Customizer is supported,
|
||||
* and apply either the no-customize-support or customize-support class
|
||||
* to the body.
|
||||
*
|
||||
|
||||
@@ -1406,7 +1406,7 @@ function _wp_sidebars_changed() {
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param mixed $theme_changed Whether the theme was changed as a boolean. A value
|
||||
* of 'customize' defers updates for the customizer.
|
||||
* of 'customize' defers updates for the Customizer.
|
||||
* @return array
|
||||
*/
|
||||
function retrieve_widgets( $theme_changed = false ) {
|
||||
|
||||
Reference in New Issue
Block a user