| @@ -10,21 +10,12 @@ | ||
| 10 | 10 | if ( is_admin() ) { |
| 11 | 11 | add_action( 'admin_menu', array( $this, 'app_menu' ) ); |
| 12 | 12 | |
| 13 | 13 | // Load the scripts only if they are needed by the current screen |
| 14 | - // $page = isset( $_GET["page"] ) ? sanitize_text_field( $_GET["page"] ) : null; | |
| 15 | - // $is_mwcode_screen = in_array( $page, [ 'mwcode_settings' ] ); | |
| 16 | - // $is_meowapps_dashboard = $page === 'meowapps-main-menu'; | |
| 17 | - | |
| 18 | - | |
| 19 | - // if ( $is_meowapps_dashboard || $is_mwcode_screen ) { | |
| 20 | - // add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); | |
| 21 | - // } | |
| 22 | - | |
| 23 | - $can_access_settings = $this->core->can_access_settings(); | |
| 24 | - $can_access_features = $this->core->can_access_features(); | |
| 25 | - | |
| 26 | - if ( $can_access_settings || $can_access_features ) { | |
| 14 | + $page = isset( $_GET["page"] ) ? sanitize_text_field( $_GET["page"] ) : null; | |
| 15 | + $is_mwcode_screen = in_array( $page, [ 'mwcode_settings' ] ); | |
| 16 | + $is_meowapps_dashboard = $page === 'meowapps-main-menu'; | |
| 17 | + if ( $is_meowapps_dashboard || $is_mwcode_screen ) { | |
| 27 | 18 | add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); |
| 28 | 19 | } |
| 29 | 20 | } |
| 30 | 21 | } |