Files
2024_WORDPRESS_PLUGIN_custer/admin_menu.php
2024-07-17 15:18:42 +02:00

46 lines
729 B
PHP

<?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();
}
?>