Skip to content

Commit

Permalink
fix: solve customizer permissions on multisites #4033
Browse files Browse the repository at this point in the history
  • Loading branch information
preda-bogdan committed Jul 13, 2023
1 parent b754bb8 commit 0b902b8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions inc/admin/dashboard/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function register() {
[ $this, 'render' ]
);

$this->copy_customizer_page( $theme_page, $capability );
$this->copy_customizer_page( $theme_page );

if ( ! defined( 'NEVE_PRO_VERSION' ) || 'valid' !== apply_filters( 'product_neve_license_status', false ) ) {
// Add Custom Layout submenu for upsell.
Expand All @@ -235,11 +235,10 @@ public function register() {
* Copy the customizer page to the dashboard.
*
* @param string $theme_page The theme page slug.
* @param string $capability The capability required to view the page.
*
* @return void
*/
private function copy_customizer_page( $theme_page, $capability ) {
private function copy_customizer_page( $theme_page ) {
global $submenu;
if ( ! isset( $submenu['themes.php'] ) ) {
return;
Expand Down Expand Up @@ -267,7 +266,7 @@ private function copy_customizer_page( $theme_page, $capability ) {
$theme_page,
$customizer_menu_item[0],
$customizer_menu_item[0],
$capability,
'manage_options',
'customize.php'
);
}
Expand Down

0 comments on commit 0b902b8

Please sign in to comment.