turned custer into a repo
This commit is contained in:
45
admin_menu.php
Normal file
45
admin_menu.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
namespace CUSTER;
|
||||
|
||||
/*
|
||||
* 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 add_plugin_menu() {
|
||||
\Plgntls_custer::add_menu(__NAMESPACE__.'\menu_content');
|
||||
}
|
||||
add_action('admin_menu', __NAMESPACE__.'\add_plugin_menu');
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* the construction of the admin menu page
|
||||
*
|
||||
*/
|
||||
function menu_content() {
|
||||
$option_notice_object = Custer::OPTION_NOTICE;
|
||||
|
||||
//delete_option($option_notice_object['_name']);
|
||||
$option_notice = \Plgntls_custer::get_option_safe($option_notice_object, true);
|
||||
|
||||
ob_start();
|
||||
include(\Plgntls_custer::root_path() . 'admin_menu.html');
|
||||
echo ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user