wp plugin v 1.5.1
This commit is contained in:
@@ -54,33 +54,24 @@ class Igny8Admin {
|
||||
__('IGNY8', 'igny8-bridge'),
|
||||
__('IGNY8', 'igny8-bridge'),
|
||||
'manage_options',
|
||||
'igny8-dashboard',
|
||||
'igny8-connection',
|
||||
array($this, 'render_page'),
|
||||
'dashicons-cloud-saved',
|
||||
58
|
||||
);
|
||||
|
||||
// Add submenu pages
|
||||
// Add submenu pages - Dashboard is the main page (connection.php)
|
||||
add_submenu_page(
|
||||
'igny8-dashboard',
|
||||
'igny8-connection',
|
||||
__('Dashboard', 'igny8-bridge'),
|
||||
__('Dashboard', 'igny8-bridge'),
|
||||
'manage_options',
|
||||
'igny8-dashboard',
|
||||
array($this, 'render_page')
|
||||
);
|
||||
|
||||
add_submenu_page(
|
||||
'igny8-dashboard',
|
||||
__('Connection', 'igny8-bridge'),
|
||||
__('Connection', 'igny8-bridge'),
|
||||
'manage_options',
|
||||
'igny8-connection',
|
||||
array($this, 'render_page')
|
||||
);
|
||||
|
||||
add_submenu_page(
|
||||
'igny8-dashboard',
|
||||
'igny8-connection',
|
||||
__('Settings', 'igny8-bridge'),
|
||||
__('Settings', 'igny8-bridge'),
|
||||
'manage_options',
|
||||
@@ -89,16 +80,7 @@ class Igny8Admin {
|
||||
);
|
||||
|
||||
add_submenu_page(
|
||||
'igny8-dashboard',
|
||||
__('Sync', 'igny8-bridge'),
|
||||
__('Sync', 'igny8-bridge'),
|
||||
'manage_options',
|
||||
'igny8-sync',
|
||||
array($this, 'render_page')
|
||||
);
|
||||
|
||||
add_submenu_page(
|
||||
'igny8-dashboard',
|
||||
'igny8-connection',
|
||||
__('Data', 'igny8-bridge'),
|
||||
__('Data', 'igny8-bridge'),
|
||||
'manage_options',
|
||||
@@ -107,7 +89,7 @@ class Igny8Admin {
|
||||
);
|
||||
|
||||
add_submenu_page(
|
||||
'igny8-dashboard',
|
||||
'igny8-connection',
|
||||
__('Logs', 'igny8-bridge'),
|
||||
__('Logs', 'igny8-bridge'),
|
||||
'manage_options',
|
||||
@@ -283,7 +265,7 @@ class Igny8Admin {
|
||||
}
|
||||
|
||||
// Determine which page to render
|
||||
$page = isset($_GET['page']) ? sanitize_text_field($_GET['page']) : 'igny8-dashboard';
|
||||
$page = isset($_GET['page']) ? sanitize_text_field($_GET['page']) : 'igny8-connection';
|
||||
|
||||
// Add wrapper class for modern design
|
||||
echo '<div class="igny8-admin-page">';
|
||||
@@ -292,17 +274,13 @@ class Igny8Admin {
|
||||
$template_file = '';
|
||||
switch ($page) {
|
||||
case 'igny8-dashboard':
|
||||
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/dashboard.php';
|
||||
break;
|
||||
case 'igny8-connection':
|
||||
// Dashboard is now the connection page
|
||||
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/connection.php';
|
||||
break;
|
||||
case 'igny8-settings':
|
||||
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/settings.php';
|
||||
break;
|
||||
case 'igny8-sync':
|
||||
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/sync.php';
|
||||
break;
|
||||
case 'igny8-data':
|
||||
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/data.php';
|
||||
break;
|
||||
@@ -310,7 +288,7 @@ class Igny8Admin {
|
||||
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/logs.php';
|
||||
break;
|
||||
default:
|
||||
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/dashboard.php';
|
||||
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/connection.php';
|
||||
}
|
||||
|
||||
// If the template file doesn't exist, fall back to the old settings page
|
||||
|
||||
Reference in New Issue
Block a user