| @@ -43,12 +43,8 @@ | ||
| 43 | 43 | |
| 44 | 44 | return; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if( $this->is_patcher_page() ) { | |
| 48 | - add_action('admin_enqueue_scripts', array( $this, 'enqueue_patcher_scripts' )); | |
| 49 | - } | |
| 50 | - | |
| 51 | 47 | add_action( 'admin_menu', array( $this, 'add_admin_menu' ) ); |
| 52 | 48 | add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 ); |
| 53 | 49 | add_action( 'admin_enqueue_scripts', array( $this, 'analytics_assets' ) ); |
| 54 | 50 | add_action( 'wp_dashboard_setup', array( $this, 'dashboard_analytics_widget' ) ); |
| @@ -208,29 +204,8 @@ | ||
| 208 | 204 | } |
| 209 | 205 | } |
| 210 | 206 | |
| 211 | 207 | /** |
| 212 | - * Is aThemes Patcher page. | |
| 213 | - * | |
| 214 | - * @return bool | |
| 215 | - */ | |
| 216 | - public function is_patcher_page() { | |
| 217 | - global $pagenow; | |
| 218 | - | |
| 219 | - // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 220 | - return $pagenow === 'admin.php' && ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] === 'athemes-patcher-preview-mp' ); | |
| 221 | - } | |
| 222 | - | |
| 223 | - /** | |
| 224 | - * Enqueue aThemes Patcher preview scripts and styles. | |
| 225 | - * | |
| 226 | - * @return void | |
| 227 | - */ | |
| 228 | - public function enqueue_patcher_scripts() { | |
| 229 | - wp_enqueue_style( 'wp-components' ); | |
| 230 | - } | |
| 231 | - | |
| 232 | - /** | |
| 233 | 208 | * Include required classes. |
| 234 | 209 | * |
| 235 | 210 | * @return void |
| 236 | 211 | */ |
| @@ -304,20 +279,8 @@ | ||
| 304 | 279 | '', |
| 305 | 280 | 5 |
| 306 | 281 | ); |
| 307 | 282 | |
| 308 | - // Add 'aThemes Patcher' link | |
| 309 | - add_submenu_page( // phpcs:ignore WPThemeReview.PluginTerritory.NoAddAdminPages.add_menu_pages_add_submenu_page | |
| 310 | - 'merchant', | |
| 311 | - esc_html__('Patcher', 'merchant'), | |
| 312 | - esc_html__('Patcher', 'merchant'), | |
| 313 | - $this->capability, | |
| 314 | - 'athemes-patcher-preview-mp', | |
| 315 | - array( $this, 'html_patcher' ), | |
| 316 | - 6 | |
| 317 | - ); | |
| 318 | - | |
| 319 | - | |
| 320 | 283 | // Add 'Upgrade' link. |
| 321 | 284 | if ( ! defined( 'MERCHANT_PRO_VERSION' ) ) { |
| 322 | 285 | $url = merchant_admin_upgrade_link( |
| 323 | 286 | 'https://athemes.com/merchant-upgrade', |
| @@ -583,17 +546,8 @@ | ||
| 583 | 546 | } |
| 584 | 547 | }); |
| 585 | 548 | </script> |
| 586 | 549 | <?php |
| 587 | - } | |
| 588 | - | |
| 589 | - /** | |
| 590 | - * HTML aThemes Patcher. | |
| 591 | - * | |
| 592 | - * @return void | |
| 593 | - */ | |
| 594 | - public function html_patcher() { | |
| 595 | - require_once MERCHANT_DIR . 'admin/pages/page-patcher.php'; | |
| 596 | 550 | } |
| 597 | 551 | } |
| 598 | 552 | |
| 599 | 553 | Merchant_Admin_Menu::instance(); |