creation of the repo fbpatch
This commit is contained in:
38
menu/admin_menu.php
Normal file
38
menu/admin_menu.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace FBPATCH;
|
||||
|
||||
/*
|
||||
* it means someone outside wp is accessing the file, in this case kill it.
|
||||
*/
|
||||
if (!defined('ABSPATH')) {
|
||||
die('You can not access this file!');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* creates the plugin menu
|
||||
*
|
||||
*/
|
||||
function plugin_menu() {
|
||||
$menu_page_title = 'fbpatch';
|
||||
$menu_title = 'fbpatch';
|
||||
$menu_capability = 'manage_options';
|
||||
$menu_slug = 'fbpatch-plugin';
|
||||
$menu_callback = __NAMESPACE__.'\plugin_content';
|
||||
|
||||
\FBPATCH\toggle_menu($menu_page_title, $menu_title, $menu_capability, $menu_slug, $menu_callback);
|
||||
}
|
||||
add_action('admin_menu', __NAMESPACE__.'\plugin_menu');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user