WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/24/2017 07:05:48 PM (2 years ago)
Author:
westonruter
Message:

Customize: Prevent theme installation and deletion in Customizer while SFTP credentials need to be requested.

This is a temporary measure while we wait for credentials to be able to be supplied in the Customizer.

Amends [41788].
See #42184, #37661, #42126.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r41989 r41997  
    46194619        );
    46204620
     4621        // Temporarily disable installation in Customizer. See #42184.
     4622        $filesystem_method = get_filesystem_method();
     4623        ob_start();
     4624        $filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() );
     4625        ob_end_clean();
     4626        if ( 'direct' !== $filesystem_method && ! $filesystem_credentials_are_stored ) {
     4627            $settings['theme']['_filesystemCredentialsNeeded'] = true;
     4628        }
     4629
    46214630        // Prepare Customize Section objects to pass to JavaScript.
    46224631        foreach ( $this->sections() as $id => $section ) {
Note: See TracChangeset for help on using the changeset viewer.