added custer menu for notice
This commit is contained in:
@@ -1 +1,66 @@
|
||||
<h1>heloooo</h1>
|
||||
<style>
|
||||
#custer_notice_html_wrapper {
|
||||
margin: 15px 15px 15px 0px;
|
||||
#custer_notice_html {
|
||||
margin: 0px;
|
||||
<?php echo $option_notice['style']; ?>
|
||||
}
|
||||
}
|
||||
form.form_custer {
|
||||
margin: 15px 15px 15px 0px;
|
||||
border: 1px solid black;
|
||||
padding: 15px;
|
||||
details:not([open]) {
|
||||
summary {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
details {
|
||||
summary {
|
||||
h2 {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
summary ~ * {
|
||||
margin-top: 20px;
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
textarea {
|
||||
resize: vertical;
|
||||
height: 120px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="custer_notice_html_wrapper">
|
||||
<div id="custer_notice_html">
|
||||
<?php echo $option_notice['html']; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo Plgntls_custer::open_form_option($option_notice['_name'], 'POST', 'form_custer'); ?>
|
||||
<details class="">
|
||||
<summary><h2>modifier le mode d'emplois :</h2></summary>
|
||||
|
||||
<div class="">
|
||||
<label for="<?php echo esc_html(stripslashes($option_notice['_name'])); ?>_modify_style_custer">style : </label>
|
||||
<textarea id="<?php echo esc_html(stripslashes($option_notice['_name'])); ?>_modify_style_custer" name="style"><?php echo esc_html(stripslashes($option_notice['style'])); ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<label for="<?php echo esc_html(stripslashes($option_notice['_name'])); ?>_modify_html_custer">html : </label>
|
||||
<textarea id="<?php echo esc_html(stripslashes($option_notice['_name'])); ?>_modify_html_custer" name="html"><?php echo esc_html(stripslashes($option_notice['html'])); ?></textarea>
|
||||
</div>
|
||||
|
||||
<input type="submit" value="send"/>
|
||||
</details>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -10,38 +10,34 @@ if (!defined('ABSPATH')) {
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 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 custer_plugin_content() {
|
||||
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_once(plugin_dir_path(__FILE__) . '/admin_menu.html');
|
||||
include(\Plgntls_custer::root_path() . 'admin_menu.html');
|
||||
echo ob_get_clean();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* menu plugin
|
||||
*/
|
||||
function custer_plugin_menu() {
|
||||
$menu_page_title = 'custer';
|
||||
$menu_title = 'custer';
|
||||
$menu_capability = 'manage_options';
|
||||
$menu_slug = 'custer-plugin';
|
||||
$menu_callback = __NAMESPACE__.'\custer_plugin_content';
|
||||
|
||||
\CUSTER\toggle_menu($menu_page_title, $menu_title, $menu_capability, $menu_slug, $menu_callback);
|
||||
}
|
||||
add_action('admin_menu', __NAMESPACE__.'\custer_plugin_menu');
|
||||
|
||||
|
||||
//function update_payment_messages_option_CIPF($request, $option_name, $option_data, $option_default) {
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,17 +16,18 @@ if (!defined('ABSPATH')) {
|
||||
}
|
||||
|
||||
|
||||
include_once(plugin_dir_path(__FILE__) . '/plgntls_class.php');
|
||||
|
||||
include_once(plugin_dir_path(__FILE__) . '/custer_class.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/get_user_id.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/change_id.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/format_user_infos.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/user_infos.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/filter_mail.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/queries.php');
|
||||
include_once(Plgntls_custer::root_path() . 'custer_class.php');
|
||||
include_once(Plgntls_custer::root_path() . 'get_user_id.php');
|
||||
include_once(Plgntls_custer::root_path() . 'change_id.php');
|
||||
include_once(Plgntls_custer::root_path() . 'format_user_infos.php');
|
||||
include_once(Plgntls_custer::root_path() . 'user_infos.php');
|
||||
include_once(Plgntls_custer::root_path() . 'filter_mail.php');
|
||||
include_once(Plgntls_custer::root_path() . 'queries.php');
|
||||
|
||||
include_once(plugin_dir_path(__FILE__) . '/admin_menu.php');
|
||||
include_once(plugin_dir_path(__FILE__) . '/admin_menu_toggle.php');
|
||||
include_once(Plgntls_custer::root_path() . 'admin_menu.php');
|
||||
//include_once(Plgntls_custer::root_path() . 'admin_menu_toggle.php');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,9 +17,21 @@ if (!defined('ABSPATH')) {
|
||||
*/
|
||||
class Custer {
|
||||
|
||||
const USER_INFO_DATE_FORMAT = 'd/m/Y'; // for user_infos.php (date format : https://www.php.net/manual/fr/datetime.format.php)
|
||||
const SLUG_TOOGLE_ADMIN_MENU = ['_name'=>'toogle_admin_menu_url_custer', 'toggle'=>'toggle', 'show'=>'show', 'hide'=>'hide'];
|
||||
const OPTION_TOGGLE_MENU = ['_name'=>'toggle_admin_menu_option_custer', 'show'=>'show', 'hide'=>'hide'];
|
||||
const OPTION_NOTICE = [
|
||||
'_name'=>'notice_usage_custer',
|
||||
'_default' => [
|
||||
'style'=>
|
||||
'p {
|
||||
border: 1px solid blue;
|
||||
}',
|
||||
'html'=>
|
||||
'<p>helo</p>',
|
||||
],
|
||||
];
|
||||
|
||||
const USER_INFO_DATE_FORMAT = 'd/m/Y'; // for user_infos.php (date format : https://www.php.net/manual/fr/datetime.format.php)
|
||||
const OPTION_ANCHOR = 'custer_anchor_ids';
|
||||
const QUERIES = [
|
||||
'__author_page_url__',
|
||||
|
||||
1394
plugins/custer/plgntls_class.php
Normal file
1394
plugins/custer/plgntls_class.php
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user