| @@ -5,8 +5,11 @@ | ||
| 5 | 5 | */ |
| 6 | 6 | public function __construct() { |
| 7 | 7 | add_filter( 'admin_body_class', [ $this, 'body_class' ] ); |
| 8 | 8 | new admin\Menu(); |
| 9 | + | |
| 10 | + // Load Demo Importer. | |
| 11 | + require_once FORUMAX_PATH . 'includes/admin/Demo_Importer.php'; | |
| 9 | 12 | } |
| 10 | 13 | |
| 11 | 14 | /** |
| 12 | 15 | * Add body class to admin pages. |
| @@ -14,17 +17,26 @@ | ||
| 14 | 17 | * @param string $classes Body classes. |
| 15 | 18 | * @return string |
| 16 | 19 | */ |
| 17 | 20 | public function body_class( $classes ) { |
| 18 | - // if current page is ?page=bbp-core in admin. | |
| 19 | - if ( isset( $_GET['page'] ) && 'bbp-core' === $_GET['page'] ) { | |
| 21 | + // if current page is ?page=forumax in admin. | |
| 22 | + if ( isset( $_GET['page'] ) && 'forumax' === $_GET['page'] ) { | |
| 20 | 23 | $classes .= ' bbpc-forum-ui'; |
| 21 | 24 | } |
| 22 | 25 | |
| 23 | 26 | // if has no pro plan. |
| 24 | - if ( empty( bc_fs()->is_plan( 'pro' ) ) ) { | |
| 27 | + if ( forumax_is_premium() !== true ) { | |
| 25 | 28 | $classes .= ' bbpc-no-pro'; |
| 26 | 29 | } |
| 30 | + | |
| 31 | + // if has no promax plan. | |
| 32 | + if ( forumax_is_promax() !== true ) { | |
| 33 | + $classes .= ' bbpc-no-promax'; | |
| 34 | + } | |
| 27 | 35 | |
| 36 | + if ( class_exists( 'BBPC_GEO_ROLES' ) ) { | |
| 37 | + $classes .= ' bbpc-geo-roles'; | |
| 38 | + } | |
| 39 | + | |
| 28 | 40 | return $classes; |
| 29 | 41 | } |
| 30 | 42 | } |