Skip to content

Commit

Permalink
Remove the admin menu if current users haven't permission
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Sep 18, 2024
1 parent cc7bd5e commit 320f2b7
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 @@ -661,11 +661,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 320f2b7

Please sign in to comment.