Using capabilities instead of levels which are deprecated since 2.0 (fixing #2).

This commit is contained in:
Eric van der Vlist 2020-05-08 16:05:52 +02:00
parent ec610b4ef1
commit d90b8ba1b5
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ function pageMash_add_pages(){
//add menu link
global $minlevel, $wp_version;
if($wp_version >= 2.7){
$page = add_submenu_page('edit-pages.php', 'pageMash: Page Management', __('pageMash ','pmash'), $minlevel, __FILE__, 'pageMash_main');
$page = add_submenu_page('edit-pages.php', 'pageMash: Page Management', __('pageMash ','pmash'), 'edit_pages', __FILE__, 'pageMash_main');
}else{
$page = add_management_page('pageMash: Page Management', 'pageMash', $minlevel, __FILE__, 'pageMash_main');
}