diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index deafe6c2ca..47e546f9d3 100644
|
|
|
7001 | 7001 | publishSettingsBtn = $( '#publish-settings' ), |
7002 | 7002 | footerActions = $( '#customize-footer-actions' ); |
7003 | 7003 | |
| 7004 | // Add publish settings section in JS instead of PHP since the Customizer depends on it to function. |
| 7005 | api.bind( 'ready', function() { |
| 7006 | api.section.add( new api.OuterSection( 'publish_settings', { |
| 7007 | title: api.l10n.publishSettings, |
| 7008 | priority: 0, |
| 7009 | active: api.settings.theme.active |
| 7010 | } ) ); |
| 7011 | } ); |
| 7012 | |
7004 | 7013 | // Set up publish settings section and its controls. |
7005 | 7014 | api.section( 'publish_settings', function( section ) { |
7006 | 7015 | var updateButtonsState, trashControl, updateSectionActive, isSectionActive, statusControl, dateControl, toggleDateControl, publishWhenTime, pollInterval, updateTimeArrivedPoller, cancelScheduleButtonReminder, timeArrivedPollingInterval = 1000; |
diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index 21760bad4f..1a0f12f849 100644
|
|
final class WP_Customize_Manager { |
4744 | 4744 | $this->register_control_type( 'WP_Customize_Code_Editor_Control' ); |
4745 | 4745 | $this->register_control_type( 'WP_Customize_Date_Time_Control' ); |
4746 | 4746 | |
4747 | | /* Publish Settings */ |
4748 | | |
4749 | | // Note the controls for this section are added via JS. |
4750 | | $this->add_section( 'publish_settings', array( |
4751 | | 'title' => __( 'Publish Settings' ), |
4752 | | 'priority' => 0, |
4753 | | 'capability' => 'customize', |
4754 | | 'type' => 'outer', |
4755 | | 'active_callback' => array( $this, 'is_theme_active' ), |
4756 | | ) ); |
4757 | | |
4758 | 4747 | /* Themes (controls are loaded via ajax) */ |
4759 | 4748 | |
4760 | 4749 | $this->add_panel( new WP_Customize_Themes_Panel( $this, 'themes', array( |
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index 6c2312c397..c43659379d 100644
|
|
function wp_default_scripts( &$scripts ) { |
598 | 598 | __( 'You won’t be able to install new themes from here yet since your install requires SFTP credentials. For now, please <a href="%s">add themes in the admin</a>.' ), |
599 | 599 | esc_url( admin_url( 'theme-install.php' ) ) |
600 | 600 | ), |
| 601 | 'publishSettings' => __( 'Publish Settings' ), |
601 | 602 | ) ); |
602 | 603 | $scripts->add( 'customize-selective-refresh', "/wp-includes/js/customize-selective-refresh$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 ); |
603 | 604 | |