mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01: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. Built from https://develop.svn.wordpress.org/trunk@29903 git-svn-id: http://core.svn.wordpress.org/trunk@29658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
af6beda45b
commit
61819a36ea
@ -129,10 +129,10 @@ do_action( 'customize_controls_print_scripts' );
|
||||
$cannot_expand = ! ( $wp_customize->is_theme_active() || $screenshot || $wp_customize->theme()->get('Description') );
|
||||
?>
|
||||
|
||||
<div id="widgets-right"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the customizer for compat -->
|
||||
<div id="widgets-right"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the Customizer for compat -->
|
||||
<div class="wp-full-overlay-sidebar-content accordion-container" tabindex="-1">
|
||||
<div id="customize-info" class="accordion-section <?php if ( $cannot_expand ) echo ' cannot-expand'; ?>">
|
||||
<div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Theme Customizer Options' ); ?>" tabindex="0">
|
||||
<div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>" tabindex="0">
|
||||
<span class="preview-notice"><?php
|
||||
if ( ! $wp_customize->is_theme_active() ) {
|
||||
/* translators: %s is the theme name in the Customize/Live Preview pane */
|
||||
@ -189,7 +189,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
|
||||
/*
|
||||
* If the frontend and the admin are served from the same domain, load the
|
||||
* preview over ssl if the customizer is being loaded over ssl. This avoids
|
||||
* preview over ssl if the Customizer is being loaded over ssl. This avoids
|
||||
* insecure content warnings. This is not attempted if the admin and frontend
|
||||
* are on different domains to avoid the case where the frontend doesn't have
|
||||
* ssl certs. Domain mapping plugins can allow other urls in these conditions
|
||||
@ -226,7 +226,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
'customize-login' => 1
|
||||
), wp_login_url() );
|
||||
|
||||
// Prepare customizer settings to pass to Javascript.
|
||||
// Prepare Customizer settings to pass to Javascript.
|
||||
$settings = array(
|
||||
'theme' => array(
|
||||
'stylesheet' => $wp_customize->get_stylesheet(),
|
||||
|
@ -2029,7 +2029,7 @@ final class WP_Internal_Pointers {
|
||||
}
|
||||
|
||||
$content = '<h3>' . __( 'New Feature: Live Widget Previews' ) . '</h3>';
|
||||
$content .= '<p>' . __( 'Add, edit, and play around with your widgets from the theme customizer.' ) . ' ' . __( 'Preview your changes in real-time and only save them when you’re ready.' ) . '</p>';
|
||||
$content .= '<p>' . __( 'Add, edit, and play around with your widgets from the Customizer.' ) . ' ' . __( 'Preview your changes in real-time and only save them when you’re ready.' ) . '</p>';
|
||||
|
||||
if ( 'themes' === get_current_screen()->id ) {
|
||||
$selector = '.theme.active .customize';
|
||||
|
@ -832,7 +832,7 @@
|
||||
// Limit the URL to internal, front-end links.
|
||||
//
|
||||
// If the frontend and the admin are served from the same domain, load the
|
||||
// preview over ssl if the customizer is being loaded over ssl. This avoids
|
||||
// preview over ssl if the Customizer is being loaded over ssl. This avoids
|
||||
// insecure content warnings. This is not attempted if the admin and frontend
|
||||
// are on different domains to avoid the case where the frontend doesn't have
|
||||
// ssl certs.
|
||||
@ -984,7 +984,7 @@
|
||||
api.settings = window._wpCustomizeSettings;
|
||||
api.l10n = window._wpCustomizeControlsL10n;
|
||||
|
||||
// Check if we can run the customizer.
|
||||
// Check if we can run the Customizer.
|
||||
if ( ! api.settings )
|
||||
return;
|
||||
|
||||
|
@ -691,7 +691,7 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* Highlight widgets in preview when interacted with in the customizer
|
||||
* Highlight widgets in preview when interacted with in the Customizer
|
||||
*/
|
||||
_setupHighlightEffects: function() {
|
||||
var self = this;
|
||||
@ -1494,7 +1494,7 @@
|
||||
} );
|
||||
|
||||
/**
|
||||
* Expand other customizer sidebar section when dragging a control widget over it,
|
||||
* Expand other Customizer sidebar section when dragging a control widget over it,
|
||||
* allowing the control to be dropped into another section
|
||||
*/
|
||||
this.$controlSection.find( '.accordion-section-title' ).droppable({
|
||||
|
@ -499,11 +499,11 @@ function twentyeleven_layout_classes( $existing_classes ) {
|
||||
add_filter( 'body_class', 'twentyeleven_layout_classes' );
|
||||
|
||||
/**
|
||||
* Implements Twenty Eleven theme options into Theme Customizer
|
||||
* Implements Twenty Eleven theme options into Customizer
|
||||
*
|
||||
* @since Twenty Eleven 1.3
|
||||
*
|
||||
* @param object $wp_customize Theme Customizer object.
|
||||
* @param object $wp_customize Customizer object.
|
||||
*/
|
||||
function twentyeleven_customize_register( $wp_customize ) {
|
||||
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
||||
@ -533,7 +533,7 @@ function twentyeleven_customize_register( $wp_customize ) {
|
||||
'priority' => 5,
|
||||
) );
|
||||
|
||||
// Link Color (added to Color Scheme section in Theme Customizer)
|
||||
// Link Color (added to Color Scheme section in Customizer)
|
||||
$wp_customize->add_setting( 'twentyeleven_theme_options[link_color]', array(
|
||||
'default' => twentyeleven_get_default_link_color( $options['color_scheme'] ),
|
||||
'type' => 'option',
|
||||
@ -574,7 +574,7 @@ function twentyeleven_customize_register( $wp_customize ) {
|
||||
add_action( 'customize_register', 'twentyeleven_customize_register' );
|
||||
|
||||
/**
|
||||
* Bind JS handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
* Bind JS handlers to make Customizer preview reload changes asynchronously.
|
||||
*
|
||||
* Used with blogname and blogdescription.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Twenty Fifteen Theme Customizer.
|
||||
* Twenty Fifteen Customizer.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Fifteen
|
||||
@ -8,11 +8,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add postMessage support for site title and description for the Theme Customizer.
|
||||
* Add postMessage support for site title and description for the Customizer.
|
||||
*
|
||||
* @since Twenty Fifteen 1.0
|
||||
*
|
||||
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||
* @param WP_Customize_Manager $wp_customize Customizer object.
|
||||
*/
|
||||
function twentyfifteen_customize_register( $wp_customize ) {
|
||||
$color_scheme = twentyfifteen_get_color_scheme();
|
||||
@ -650,7 +650,7 @@ function twentyfifteen_color_scheme_css() {
|
||||
add_action( 'wp_enqueue_scripts', 'twentyfifteen_color_scheme_css' );
|
||||
|
||||
/**
|
||||
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
* Binds JS handlers to make Customizer preview reload changes asynchronously.
|
||||
*
|
||||
* @since Twenty Fifteen 1.0
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* global colorScheme */
|
||||
/**
|
||||
* Theme Customizer enhancements for a better user experience.
|
||||
* Customizer enhancements for a better user experience.
|
||||
*
|
||||
* Adds listener to Color Scheme control to update other color controls with new values/defaults
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Theme Customizer enhancements for a better user experience.
|
||||
* Customizer enhancements for a better user experience.
|
||||
*
|
||||
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
* Contains handlers to make Customizer preview reload changes asynchronously.
|
||||
*/
|
||||
|
||||
( function( $ ) {
|
||||
|
@ -505,7 +505,7 @@ require get_template_directory() . '/inc/custom-header.php';
|
||||
// Custom template tags for this theme.
|
||||
require get_template_directory() . '/inc/template-tags.php';
|
||||
|
||||
// Add Theme Customizer functionality.
|
||||
// Add Customizer functionality.
|
||||
require get_template_directory() . '/inc/customizer.php';
|
||||
|
||||
/*
|
||||
|
@ -39,7 +39,7 @@ function twentyfourteen_upgrade_notice() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent the Theme Customizer from being loaded on WordPress versions prior to 3.6.
|
||||
* Prevent the Customizer from being loaded on WordPress versions prior to 3.6.
|
||||
*
|
||||
* @since Twenty Fourteen 1.0
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Twenty Fourteen Theme Customizer support
|
||||
* Twenty Fourteen Customizer support
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Fourteen
|
||||
@ -8,11 +8,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implement Theme Customizer additions and adjustments.
|
||||
* Implement Customizer additions and adjustments.
|
||||
*
|
||||
* @since Twenty Fourteen 1.0
|
||||
*
|
||||
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||
* @param WP_Customize_Manager $wp_customize Customizer object.
|
||||
*/
|
||||
function twentyfourteen_customize_register( $wp_customize ) {
|
||||
// Add postMessage support for site title and description.
|
||||
@ -80,7 +80,7 @@ function twentyfourteen_sanitize_layout( $layout ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind JS handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
* Bind JS handlers to make Customizer preview reload changes asynchronously.
|
||||
*
|
||||
* @since Twenty Fourteen 1.0
|
||||
*/
|
||||
|
@ -97,7 +97,7 @@ class Featured_Content {
|
||||
/**
|
||||
* Hide "featured" tag from the front-end.
|
||||
*
|
||||
* Has to run on wp_loaded so that the preview filters of the customizer
|
||||
* Has to run on wp_loaded so that the preview filters of the Customizer
|
||||
* have a chance to alter the value.
|
||||
*
|
||||
* @static
|
||||
@ -396,7 +396,7 @@ class Featured_Content {
|
||||
* @access public
|
||||
* @since Twenty Fourteen 1.0
|
||||
*
|
||||
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||
* @param WP_Customize_Manager $wp_customize Customizer object.
|
||||
*/
|
||||
public static function customize_register( $wp_customize ) {
|
||||
$wp_customize->add_section( 'featured_content', array(
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Twenty Fourteen Theme Customizer enhancements for a better user experience.
|
||||
* Twenty Fourteen Customizer enhancements for a better user experience.
|
||||
*
|
||||
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
* Contains handlers to make Customizer preview reload changes asynchronously.
|
||||
*/
|
||||
( function( $ ) {
|
||||
// Site title and description.
|
||||
|
@ -39,7 +39,7 @@ function twentythirteen_upgrade_notice() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent the Theme Customizer from being loaded on WordPress versions prior to 3.6.
|
||||
* Prevent the Customizer from being loaded on WordPress versions prior to 3.6.
|
||||
*
|
||||
* @since Twenty Thirteen 1.0
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Theme Customizer enhancements for a better user experience.
|
||||
* Customizer enhancements for a better user experience.
|
||||
*
|
||||
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
* Contains handlers to make Customizer preview reload changes asynchronously.
|
||||
* Things like site title and description changes.
|
||||
*/
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Theme Customizer enhancements for a better user experience.
|
||||
* Customizer enhancements for a better user experience.
|
||||
*
|
||||
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
* Contains handlers to make Customizer preview reload changes asynchronously.
|
||||
* Things like site title, description, and background color changes.
|
||||
*/
|
||||
|
||||
|
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user