Skip to content

Commit

Permalink
Merge pull request #1008 from Codeinwp/bugfix/pro/560
Browse files Browse the repository at this point in the history
Removed the admin menu if current users haven't permission
  • Loading branch information
vytisbulkevicius authored Nov 11, 2024
2 parents 3430ef0 + 320f2b7 commit 57ef0c1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions includes/admin/class-rop-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,13 @@ function () {
);

global $submenu;
$submenu['TweetOldPost'][2] = array(
$rss_to_social,
'manage_options',
tsdk_utmify( self::RN_LINK, 'admin', 'admin_menu' ),
);
if ( isset( $submenu['TweetOldPost'] ) ) {
$submenu['TweetOldPost'][2] = array(
$rss_to_social,
'manage_options',
tsdk_utmify( self::RN_LINK, 'admin', 'admin_menu' ),
);
}
}
}

Expand Down

0 comments on commit 57ef0c1

Please sign in to comment.