Customize: Prevent showing SFTP theme installation notification in multisite when user cannot install themes.

Props flixos90.
See #37661, #42184.
Fixes #42674.

Built from https://develop.svn.wordpress.org/trunk@42536


git-svn-id: http://core.svn.wordpress.org/trunk@42365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter
2018-01-22 06:15:30 +00:00
parent fa460ab32f
commit cd9f48b54f
4 changed files with 11 additions and 10 deletions

View File

@@ -4702,8 +4702,9 @@ final class WP_Customize_Manager {
'previewFrameSensitivity' => 2000,
),
'theme' => array(
'stylesheet' => $this->get_stylesheet(),
'active' => $this->is_theme_active(),
'stylesheet' => $this->get_stylesheet(),
'active' => $this->is_theme_active(),
'_canInstall' => current_user_can( 'install_themes' ),
),
'url' => array(
'preview' => esc_url_raw( $this->get_preview_url() ),