turned custer into a repo

This commit is contained in:
asus
2024-07-17 15:18:42 +02:00
parent 544138e6c6
commit b551112094
11 changed files with 2776 additions and 0 deletions

45
admin_menu.php Normal file
View 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();
}
?>