Customize: Register the Publish Settings section in JS to ensure it does not get unregistered via PHP.

The `publish_settings` section is a fundamental dependency for Customizer, so it must be guaranteed to be registered.

Also unconditionally register core types for panels, sections, and controls in case plugin unhooks all `customize_register` actions.

See #39896.
Fixes #42337.


git-svn-id: https://develop.svn.wordpress.org/trunk@42025 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2017-10-25 21:44:48 +00:00
parent 610b1f05de
commit 6f5777ecbf
3 changed files with 28 additions and 29 deletions

View File

@@ -598,6 +598,7 @@ function wp_default_scripts( &$scripts ) {
__( 'You won&#8217;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>.' ),
esc_url( admin_url( 'theme-install.php' ) )
),
'publishSettings' => __( 'Publish Settings' ),
) );
$scripts->add( 'customize-selective-refresh', "/wp-includes/js/customize-selective-refresh$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 );