mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Theme Customizer: Allow the customize iframe to be accessed directly (with full feature support). see #19910.
* Move the 'Return to Manage Themes' and 'Collapse Sidebar' actions from themes.php to customize-controls.php. * Create a postMessage connection between themes.php and customize-controls.php. * Allow the theme customizer to be accessed directly (independent of themes.php and the customize loader). * Add wp_customize_href() and wp_customize_url(). * Remove wp_customize_loader(). To include the loader, use wp_enqueue_script( 'customize-loader' ). * The theme customizer now requires postMessage browser support. * Add .hide-if-customize and .hide-if-no-customize CSS classes. * Clean up customize-preview.js. git-svn-id: https://develop.svn.wordpress.org/trunk@20476 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -50,7 +50,11 @@ do_action( 'customize_controls_print_scripts' );
|
||||
<input type="hidden" id="customize-template" name="template" value="<?php echo esc_attr( $theme['Template'] ); ?>" />
|
||||
<input type="hidden" id="customize-stylesheet" name="stylesheet" value="<?php echo esc_attr( $theme['Stylesheet'] ); ?>" />
|
||||
|
||||
<div id="customize-header-actions" class="customize-section wp-full-overlay-header"> </div>
|
||||
<div id="customize-header-actions" class="customize-section wp-full-overlay-header">
|
||||
<a class="back" href="<?php echo esc_url( admin_url( 'themes.php' ) ); ?>">
|
||||
<?php printf( __( '← Return to %s' ), __('Manage Themes') ); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="customize-info" class="customize-section">
|
||||
<div class="customize-section-title">
|
||||
@@ -79,6 +83,10 @@ do_action( 'customize_controls_print_scripts' );
|
||||
<?php
|
||||
submit_button( __( 'Save' ), 'primary', 'save', false );
|
||||
?>
|
||||
<a href="#" class="collapse-sidebar button-secondary" title="<?php esc_attr_e('Collapse Sidebar'); ?>">
|
||||
<span class="collapse-sidebar-label"><?php _e('Collapse'); ?></span>
|
||||
<span class="collapse-sidebar-arrow"></span>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
<div id="customize-preview" class="wp-full-overlay-main">
|
||||
@@ -95,6 +103,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
'settings' => array(),
|
||||
'controls' => array(),
|
||||
'prefix' => WP_Customize_Setting::name_prefix,
|
||||
'parent' => esc_url( admin_url() ),
|
||||
);
|
||||
|
||||
foreach ( $this->settings as $id => $setting ) {
|
||||
|
||||
Reference in New Issue
Block a user