Ticket #42674: 42674.diff
File 42674.diff, 1.9 KB (added by , 7 years ago) |
---|
-
src/wp-admin/js/customize-controls.js
3074 3074 api.Panel.prototype.attachEvents.apply( panel ); 3075 3075 3076 3076 // Temporary since supplying SFTP credentials does not work yet. See #42184 3077 if ( api.settings.theme._ filesystemCredentialsNeeded ) {3077 if ( api.settings.theme._canInstall && api.settings.theme._filesystemCredentialsNeeded ) { 3078 3078 panel.notifications.add( new api.Notification( 'theme_install_unavailable', { 3079 3079 message: api.l10n.themeInstallUnavailable, 3080 3080 type: 'info', … … 5132 5132 5133 5133 // Temporary special function since supplying SFTP credentials does not work yet. See #42184. 5134 5134 function disableInstallButtons() { 5135 return disableSwitchButtons() || true === api.settings.theme._filesystemCredentialsNeeded;5135 return disableSwitchButtons() || false === api.settings.theme._canInstall || true === api.settings.theme._filesystemCredentialsNeeded; 5136 5136 } 5137 5137 function updateButtons() { 5138 5138 control.container.find( 'button.preview, button.preview-theme' ).toggleClass( 'disabled', disableSwitchButtons() ); -
src/wp-includes/class-wp-customize-manager.php
4702 4702 'previewFrameSensitivity' => 2000, 4703 4703 ), 4704 4704 'theme' => array( 4705 'stylesheet' => $this->get_stylesheet(), 4706 'active' => $this->is_theme_active(), 4705 'stylesheet' => $this->get_stylesheet(), 4706 'active' => $this->is_theme_active(), 4707 '_canInstall' => current_user_can( 'install_themes' ), 4707 4708 ), 4708 4709 'url' => array( 4709 4710 'preview' => esc_url_raw( $this->get_preview_url() ),