cipf v 0.5.8 handle partner events

This commit is contained in:
asus
2024-04-12 17:13:57 +02:00
parent 6aa3915ef9
commit bfa68a4dd7
11 changed files with 300 additions and 217 deletions

View File

@@ -55,8 +55,8 @@ class Plgntls {
* typical for early hooks like 'init' or 'wp', where there is a first check to see if you should 'enter' in this function, level 1 will be present after thoses checks
* 2 : output everything
*
private static $_DEBUG_INFOS = 1;
private static $_DEBUG_INFOS = 2;
private static $_DEBUG_INFOS = 1;
*/
private static $_DEBUG_INFOS = 0;
@@ -947,6 +947,8 @@ class Plgntls {
'capability'=> 'manage_options',
'slug' => $menu_options['name'],
'callback' => $menu_options['callback'],
'icon' => '',
'position' => 10,
'toggle' => true,
);
foreach ($default as $key => $value) {
@@ -956,7 +958,15 @@ class Plgntls {
}
if (false === $menu_options['toggle']) {
add_menu_page($menu_options['page_title'], $menu_options['name'], $menu_options['capability'], $menu_options['slug'], $menu_options['callback']);
add_menu_page(
$menu_options['page_title'],
$menu_options['name'],
$menu_options['capability'],
$menu_options['slug'],
$menu_options['callback'],
$menu_options['icon'],
$menu_options['position'],
);
}
else {
self::_toggle_menu($menu_options['page_title'], $menu_options['name'], $menu_options['capability'], $menu_options['slug'], $menu_options['callback']);