Changeset 29903
- Timestamp:
- 10/15/2014 05:20:34 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/customize.php
r29610 r29903 130 130 ?> 131 131 132 <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 -->132 <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 --> 133 133 <div class="wp-full-overlay-sidebar-content accordion-container" tabindex="-1"> 134 134 <div id="customize-info" class="accordion-section <?php if ( $cannot_expand ) echo ' cannot-expand'; ?>"> 135 <div class="accordion-section-title" aria-label="<?php esc_attr_e( ' ThemeCustomizer Options' ); ?>" tabindex="0">135 <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>" tabindex="0"> 136 136 <span class="preview-notice"><?php 137 137 if ( ! $wp_customize->is_theme_active() ) { … … 190 190 /* 191 191 * If the frontend and the admin are served from the same domain, load the 192 * preview over ssl if the customizer is being loaded over ssl. This avoids192 * preview over ssl if the Customizer is being loaded over ssl. This avoids 193 193 * insecure content warnings. This is not attempted if the admin and frontend 194 194 * are on different domains to avoid the case where the frontend doesn't have … … 227 227 ), wp_login_url() ); 228 228 229 // Prepare customizer settings to pass to Javascript.229 // Prepare Customizer settings to pass to Javascript. 230 230 $settings = array( 231 231 'theme' => array( -
trunk/src/wp-admin/includes/template.php
r29623 r29903 2030 2030 2031 2031 $content = '<h3>' . __( 'New Feature: Live Widget Previews' ) . '</h3>'; 2032 $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>';2032 $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>'; 2033 2033 2034 2034 if ( 'themes' === get_current_screen()->id ) { -
trunk/src/wp-admin/js/customize-controls.js
r29451 r29903 833 833 // 834 834 // If the frontend and the admin are served from the same domain, load the 835 // preview over ssl if the customizer is being loaded over ssl. This avoids835 // preview over ssl if the Customizer is being loaded over ssl. This avoids 836 836 // insecure content warnings. This is not attempted if the admin and frontend 837 837 // are on different domains to avoid the case where the frontend doesn't have … … 985 985 api.l10n = window._wpCustomizeControlsL10n; 986 986 987 // Check if we can run the customizer.987 // Check if we can run the Customizer. 988 988 if ( ! api.settings ) 989 989 return; -
trunk/src/wp-admin/js/customize-widgets.js
r29243 r29903 692 692 693 693 /** 694 * Highlight widgets in preview when interacted with in the customizer694 * Highlight widgets in preview when interacted with in the Customizer 695 695 */ 696 696 _setupHighlightEffects: function() { … … 1495 1495 1496 1496 /** 1497 * Expand other customizer sidebar section when dragging a control widget over it,1497 * Expand other Customizer sidebar section when dragging a control widget over it, 1498 1498 * allowing the control to be dropped into another section 1499 1499 */ -
trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php
r28237 r29903 500 500 501 501 /** 502 * Implements Twenty Eleven theme options into ThemeCustomizer502 * Implements Twenty Eleven theme options into Customizer 503 503 * 504 504 * @since Twenty Eleven 1.3 505 505 * 506 * @param object $wp_customize ThemeCustomizer object.506 * @param object $wp_customize Customizer object. 507 507 */ 508 508 function twentyeleven_customize_register( $wp_customize ) { … … 534 534 ) ); 535 535 536 // Link Color (added to Color Scheme section in ThemeCustomizer)536 // Link Color (added to Color Scheme section in Customizer) 537 537 $wp_customize->add_setting( 'twentyeleven_theme_options[link_color]', array( 538 538 'default' => twentyeleven_get_default_link_color( $options['color_scheme'] ), … … 575 575 576 576 /** 577 * Bind JS handlers to make ThemeCustomizer preview reload changes asynchronously.577 * Bind JS handlers to make Customizer preview reload changes asynchronously. 578 578 * 579 579 * Used with blogname and blogdescription. -
trunk/src/wp-content/themes/twentyfifteen/inc/customizer.php
r29892 r29903 1 1 <?php 2 2 /** 3 * Twenty Fifteen ThemeCustomizer.3 * Twenty Fifteen Customizer. 4 4 * 5 5 * @package WordPress … … 9 9 10 10 /** 11 * Add postMessage support for site title and description for the ThemeCustomizer.12 * 13 * @since Twenty Fifteen 1.0 14 * 15 * @param WP_Customize_Manager $wp_customize ThemeCustomizer object.11 * Add postMessage support for site title and description for the Customizer. 12 * 13 * @since Twenty Fifteen 1.0 14 * 15 * @param WP_Customize_Manager $wp_customize Customizer object. 16 16 */ 17 17 function twentyfifteen_customize_register( $wp_customize ) { … … 651 651 652 652 /** 653 * Binds JS handlers to make ThemeCustomizer preview reload changes asynchronously.653 * Binds JS handlers to make Customizer preview reload changes asynchronously. 654 654 * 655 655 * @since Twenty Fifteen 1.0 -
trunk/src/wp-content/themes/twentyfifteen/js/color-scheme-control.js
r29893 r29903 1 1 /* global colorScheme */ 2 2 /** 3 * ThemeCustomizer enhancements for a better user experience.3 * Customizer enhancements for a better user experience. 4 4 * 5 5 * Adds listener to Color Scheme control to update other color controls with new values/defaults -
trunk/src/wp-content/themes/twentyfifteen/js/customizer.js
r29892 r29903 1 1 /** 2 * ThemeCustomizer enhancements for a better user experience.2 * Customizer enhancements for a better user experience. 3 3 * 4 * Contains handlers to make ThemeCustomizer preview reload changes asynchronously.4 * Contains handlers to make Customizer preview reload changes asynchronously. 5 5 */ 6 6 -
trunk/src/wp-content/themes/twentyfourteen/functions.php
r29772 r29903 506 506 require get_template_directory() . '/inc/template-tags.php'; 507 507 508 // Add ThemeCustomizer functionality.508 // Add Customizer functionality. 509 509 require get_template_directory() . '/inc/customizer.php'; 510 510 -
trunk/src/wp-content/themes/twentyfourteen/inc/back-compat.php
r27595 r29903 40 40 41 41 /** 42 * Prevent the ThemeCustomizer from being loaded on WordPress versions prior to 3.6.42 * Prevent the Customizer from being loaded on WordPress versions prior to 3.6. 43 43 * 44 44 * @since Twenty Fourteen 1.0 -
trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php
r29827 r29903 1 1 <?php 2 2 /** 3 * Twenty Fourteen ThemeCustomizer support3 * Twenty Fourteen Customizer support 4 4 * 5 5 * @package WordPress … … 9 9 10 10 /** 11 * Implement ThemeCustomizer additions and adjustments.11 * Implement Customizer additions and adjustments. 12 12 * 13 13 * @since Twenty Fourteen 1.0 14 14 * 15 * @param WP_Customize_Manager $wp_customize ThemeCustomizer object.15 * @param WP_Customize_Manager $wp_customize Customizer object. 16 16 */ 17 17 function twentyfourteen_customize_register( $wp_customize ) { … … 81 81 82 82 /** 83 * Bind JS handlers to make ThemeCustomizer preview reload changes asynchronously.83 * Bind JS handlers to make Customizer preview reload changes asynchronously. 84 84 * 85 85 * @since Twenty Fourteen 1.0 -
trunk/src/wp-content/themes/twentyfourteen/inc/featured-content.php
r29719 r29903 98 98 * Hide "featured" tag from the front-end. 99 99 * 100 * Has to run on wp_loaded so that the preview filters of the customizer100 * Has to run on wp_loaded so that the preview filters of the Customizer 101 101 * have a chance to alter the value. 102 102 * … … 397 397 * @since Twenty Fourteen 1.0 398 398 * 399 * @param WP_Customize_Manager $wp_customize ThemeCustomizer object.399 * @param WP_Customize_Manager $wp_customize Customizer object. 400 400 */ 401 401 public static function customize_register( $wp_customize ) { -
trunk/src/wp-content/themes/twentyfourteen/js/customizer.js
r26668 r29903 1 1 /** 2 * Twenty Fourteen ThemeCustomizer enhancements for a better user experience.2 * Twenty Fourteen Customizer enhancements for a better user experience. 3 3 * 4 * Contains handlers to make ThemeCustomizer preview reload changes asynchronously.4 * Contains handlers to make Customizer preview reload changes asynchronously. 5 5 */ 6 6 ( function( $ ) { -
trunk/src/wp-content/themes/twentythirteen/inc/back-compat.php
r27598 r29903 40 40 41 41 /** 42 * Prevent the ThemeCustomizer from being loaded on WordPress versions prior to 3.6.42 * Prevent the Customizer from being loaded on WordPress versions prior to 3.6. 43 43 * 44 44 * @since Twenty Thirteen 1.0 -
trunk/src/wp-content/themes/twentythirteen/js/theme-customizer.js
r24072 r29903 1 1 /** 2 * ThemeCustomizer enhancements for a better user experience.2 * Customizer enhancements for a better user experience. 3 3 * 4 * Contains handlers to make ThemeCustomizer preview reload changes asynchronously.4 * Contains handlers to make Customizer preview reload changes asynchronously. 5 5 * Things like site title and description changes. 6 6 */ -
trunk/src/wp-content/themes/twentytwelve/js/theme-customizer.js
r23711 r29903 1 1 /** 2 * ThemeCustomizer enhancements for a better user experience.2 * Customizer enhancements for a better user experience. 3 3 * 4 * Contains handlers to make ThemeCustomizer preview reload changes asynchronously.4 * Contains handlers to make Customizer preview reload changes asynchronously. 5 5 * Things like site title, description, and background color changes. 6 6 */ -
trunk/src/wp-includes/class-wp-customize-control.php
r29721 r29903 153 153 154 154 /** 155 * Check whether control is active to current customizer preview.155 * Check whether control is active to current Customizer preview. 156 156 * 157 157 * @since 4.0.0 -
trunk/src/wp-includes/class-wp-customize-manager.php
r29788 r29903 38 38 39 39 /** 40 * Methods and properties deailing with managing widgets in the customizer.40 * Methods and properties deailing with managing widgets in the Customizer. 41 41 * 42 42 * @var WP_Customize_Widgets … … 83 83 add_action( 'wp_redirect_status', array( $this, 'wp_redirect_status' ), 1000 ); 84 84 85 // Do not spawn cron (especially the alternate cron) while running the customizer.85 // Do not spawn cron (especially the alternate cron) while running the Customizer. 86 86 remove_action( 'init', 'wp_cron' ); 87 87 … … 517 517 518 518 /** 519 * Prints a signature so we can ensure the customizer was properly executed.519 * Prints a signature so we can ensure the Customizer was properly executed. 520 520 * 521 521 * @since 3.4.0 … … 526 526 527 527 /** 528 * Removes the signature in case we experience a case where the customizer was not properly executed.528 * Removes the signature in case we experience a case where the Customizer was not properly executed. 529 529 * 530 530 * @since 3.4.0 -
trunk/src/wp-includes/class-wp-customize-widgets.php
r29488 r29903 117 117 * Set up widget addition previews. 118 118 * 119 * Since the widgets get registered on 'widgets_init' before the customizer119 * Since the widgets get registered on 'widgets_init' before the Customizer 120 120 * settings are set up on 'customize_register', we have to filter the options 121 121 * similarly to how the setting previewer will filter the options later. … … 147 147 } 148 148 149 // Input from customizer preview.149 // Input from Customizer preview. 150 150 if ( isset( $_POST['customized'] ) ) { 151 151 $this->_customized = json_decode( $this->get_post_value( 'customized' ), true ); … … 202 202 * Ensure that newly-added widgets will appear in the widgets_sidebars. 203 203 * 204 * This is necessary because the customizer's setting preview filters204 * This is necessary because the Customizer's setting preview filters 205 205 * are added after the widgets_init action, which is too late for the 206 206 * widgets to be set up properly. … … 226 226 * will be recognized. 227 227 * 228 * This is necessary because the customizer's setting preview228 * This is necessary because the Customizer's setting preview 229 229 * filters are added after the widgets_init action, which is 230 230 * too late for the widgets to be set up properly. … … 288 288 * Override sidebars_widgets for theme switch. 289 289 * 290 * When switching a theme via the customizer, supply any previously-configured290 * When switching a theme via the Customizer, supply any previously-configured 291 291 * sidebars_widgets from the target theme as the initial sidebars_widgets 292 292 * setting. Also store the old theme's existing settings so that they can … … 314 314 315 315 /** 316 * Filter old_sidebars_widgets_data customizer setting.316 * Filter old_sidebars_widgets_data Customizer setting. 317 317 * 318 318 * When switching themes, filter the Customizer setting … … 389 389 390 390 /** 391 * Register customizer settings and controls for all sidebars and widgets.391 * Register Customizer settings and controls for all sidebars and widgets. 392 392 * 393 393 * @since 3.9.0 … … 535 535 536 536 /** 537 * Covert a widget_id into its corresponding customizer setting ID (option name).537 * Covert a widget_id into its corresponding Customizer setting ID (option name). 538 538 * 539 539 * @since 3.9.0 … … 557 557 * 558 558 * Core widgets which may have controls wider than 250, but can 559 * still be shown in the narrow customizer panel. The RSS and Text559 * still be shown in the narrow Customizer panel. The RSS and Text 560 560 * widgets in Core, for example, have widths of 400 and yet they 561 * still render fine in the customizer panel. This method will561 * still render fine in the Customizer panel. This method will 562 562 * return all Core widgets as being not wide, but this can be 563 563 * overridden with the is_wide_widget_in_customizer filter. … … 665 665 666 666 /** 667 * Enqueue scripts and styles for customizer panel and export data to JavaScript.667 * Enqueue scripts and styles for Customizer panel and export data to JavaScript. 668 668 * 669 669 * @since 3.9.0 … … 965 965 966 966 /** 967 * Add hooks for the customizer preview.967 * Add hooks for the Customizer preview. 968 968 * 969 969 * @since 3.9.0 … … 983 983 * (via wp_convert_widget_settings()) and can set global variable 984 984 * $_wp_sidebars_widgets to the value of get_option( 'sidebars_widgets' ) 985 * before the customizer preview filter is added, we have to reset985 * before the Customizer preview filter is added, we have to reset 986 986 * it after the filter has been added. 987 987 * … … 1040 1040 public function export_preview_data() { 1041 1041 1042 // Prepare customizer settings to pass to Javascript.1042 // Prepare Customizer settings to pass to Javascript. 1043 1043 $settings = array( 1044 1044 'renderedSidebars' => array_fill_keys( array_unique( $this->rendered_sidebars ), true ), -
trunk/src/wp-includes/js/customize-loader.js
r29838 r29903 17 17 * an iframe overlay with the URL specified. 18 18 * 19 * e.g. <a class="load-customize" href="<?php echo wp_customize_url(); ?>">Open customizer</a>19 * e.g. <a class="load-customize" href="<?php echo wp_customize_url(); ?>">Open Customizer</a> 20 20 * 21 21 * @augments wp.customize.Events … … 46 46 event.preventDefault(); 47 47 48 // Store a reference to the link that opened the customizer.48 // Store a reference to the link that opened the Customizer. 49 49 Loader.link = $(this); 50 50 // Load the theme. … … 91 91 92 92 /** 93 * Open the customizer overlay for a specific URL.93 * Open the Customizer overlay for a specific URL. 94 94 * 95 95 * @param string src URL to load in the Customizer. … … 109 109 this.body.addClass('customize-loading'); 110 110 111 // Dirty state of customizer in iframe111 // Dirty state of Customizer in iframe 112 112 this.saved = new api.Value( true ); 113 113 … … 171 171 172 172 /** 173 * Callback after the customizer has been opened.173 * Callback after the Customizer has been opened. 174 174 */ 175 175 opened: function() { … … 185 185 } 186 186 187 // Display AYS dialog if customizer is dirty187 // Display AYS dialog if Customizer is dirty 188 188 if ( ! this.saved() && ! confirm( Loader.settings.l10n.saveAlert ) ) { 189 189 // Go forward since Customizer is exited by history.back() … … 203 203 204 204 /** 205 * Callback after the customizer has been closed.205 * Callback after the Customizer has been closed. 206 206 */ 207 207 closed: function() { -
trunk/src/wp-includes/theme.php
r29840 r29903 805 805 } else { 806 806 /* 807 * Since retrieve_widgets() is called when initializing the customizer theme,807 * Since retrieve_widgets() is called when initializing a theme in the Customizer, 808 808 * we need to to remove the theme mods to avoid overwriting changes made via 809 * the widget customizer when accessing wp-admin/widgets.php.809 * the Customizer when accessing wp-admin/widgets.php. 810 810 */ 811 811 if ( 'wp_ajax_customize_save' === current_action() ) { … … 1947 1947 1948 1948 /** 1949 * Returns a URL to load the theme customizer.1949 * Returns a URL to load the Customizer. 1950 1950 * 1951 1951 * @since 3.4.0 … … 1962 1962 1963 1963 /** 1964 * Prints a script to check whether or not the customizer is supported,1964 * Prints a script to check whether or not the Customizer is supported, 1965 1965 * and apply either the no-customize-support or customize-support class 1966 1966 * to the body. -
trunk/src/wp-includes/widgets.php
r29276 r29903 1407 1407 * 1408 1408 * @param mixed $theme_changed Whether the theme was changed as a boolean. A value 1409 * of 'customize' defers updates for the customizer.1409 * of 'customize' defers updates for the Customizer. 1410 1410 * @return array 1411 1411 */
Note: See TracChangeset
for help on using the changeset viewer.