Add Admin Menu

Note the parameters types of function add_options_page:

//Initialize admin panel
if(!function_exists(‘WikirexLatestNews_ap’)){
function WikirexLatestNews_ap(){
global $wr_latest_news;
if(!isset($wr_latest_news)){
return;
}
//echo var_dump(function_exists(‘add_options_page’));
//exit();
if(function_exists(‘add_options_page’)){
//add_options_page(‘wikirex Latest News Box’, ‘Latest News Box’, 9, basename(__FILE__), array(&$wr_latest_news, ‘print_admin_page’));
add_options_page(‘wikirex Latest News Box’, ‘Latest News Box’, ‘manage_options’, basename(__FILE__), array(&$wr_latest_news, ‘print_admin_page’));
}
}
}
//WikirexLatestNews_ap();
add_action(‘admin_menu’, ‘WikirexLatestNews_ap’);

One thought on “Add Admin Menu

Comments are closed.