| @@ -54,9 +54,9 @@ | ||
| 54 | 54 | $main_title = WPCoder::info( 'name' ); |
| 55 | 55 | $menu_title = 'All Codes'; |
| 56 | 56 | $capability = 'unfiltered_html'; |
| 57 | 57 | $slug = WPCoder::SLUG; |
| 58 | - $url_update = 'https://wpcoder.pro/?utm_source=wordpress&utm_medium=admin-menu&utm_campaign=upgrade-to-pro'; | |
| 58 | + $url_update = 'https://wpcoder.pro/pricing/?utm_source=wordpress&utm_medium=admin-menu&utm_campaign=upgrade-to-pro'; | |
| 59 | 59 | |
| 60 | 60 | add_menu_page( $main_title, $main_title, 'unfiltered_html', $slug, [ __CLASS__, 'plugin_page' ], $icon ); |
| 61 | 61 | |
| 62 | 62 | add_submenu_page( $slug, $title, $menu_title, $capability, $slug, [ __CLASS__, 'plugin_page' ] ); |
| @@ -61,10 +61,11 @@ | ||
| 61 | 61 | |
| 62 | 62 | add_submenu_page( $slug, $title, $menu_title, $capability, $slug, [ __CLASS__, 'plugin_page' ] ); |
| 63 | 63 | |
| 64 | 64 | add_submenu_page( $slug, $title, 'Add new', $capability, $slug . '-settings', [ __CLASS__, 'settings' ] ); |
| 65 | + add_submenu_page( $slug, $title, 'Snippets', $capability, $slug . '-snippets', [ __CLASS__, 'snippets' ] ); | |
| 65 | 66 | add_submenu_page( $slug, $title, 'Global PHP', $capability, $slug . '-global', [ __CLASS__, 'global_php' ] ); |
| 66 | - add_submenu_page( $slug, $title, 'Tools', $capability, $slug . '-tools', [ __CLASS__, 'tools' ] ); | |
| 67 | + add_submenu_page( $slug, $title, 'Import / Export', $capability, $slug . '-tools', [ __CLASS__, 'tools' ] ); | |
| 67 | 68 | add_submenu_page( $slug, $title, 'Support', $capability, $slug . '-support', [ __CLASS__, 'support' ] ); |
| 68 | 69 | add_submenu_page( $slug, $title, 'Upgrade to Pro', $capability, $url_update ); |
| 69 | 70 | } |
| 70 | 71 | |
| @@ -81,8 +82,16 @@ | ||
| 81 | 82 | } |
| 82 | 83 | |
| 83 | 84 | public static function settings(): void { |
| 84 | 85 | $page_path = DashboardHelper::get_folder_path( 'pages' ) . '/2.settings.php'; |
| 86 | + | |
| 87 | + if ( file_exists( $page_path ) ) { | |
| 88 | + require_once $page_path; | |
| 89 | + } | |
| 90 | + } | |
| 91 | + | |
| 92 | + public static function snippets() { | |
| 93 | + $page_path = DashboardHelper::get_folder_path( 'pages' ) . '/3.snippets.php'; | |
| 85 | 94 | |
| 86 | 95 | if ( file_exists( $page_path ) ) { |
| 87 | 96 | require_once $page_path; |
| 88 | 97 | } |