PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.0
Forumax – AI Powered Advanced Community Forum Plugin v2.5.0
2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 All 30 releases
← All changes | includes/Admin.php +19 -19 1.1.0 → 2.5.0 View file →
@@ -3,28 +3,13 @@
3 3 /**
4 4 * Admin class construct
5 5 */
6 6 public function __construct() {
7 -
8 7 add_filter( 'admin_body_class', [ $this, 'body_class' ] );
9 -
10 8 new admin\Menu();
11 - $this->load_csf();
12 - }
13 9
14 - /**
15 - * Load Codestar Framework and related settings.
16 - *
17 - * @return void
18 - */
19 - public function load_csf() {
20 - require BBPC_DIR . 'includes/admin/settings/codestar-framework/codestar-framework.php';
21 -
22 - if ( class_exists( 'BBPCorePro' ) ) {
23 - require BBPC_DIR . 'includes/admin/settings/options/pro-settings.php';
24 - } else {
25 - require BBPC_DIR . 'includes/admin/settings/options/settings.php';
26 - }
10 + // Load Demo Importer.
11 + require_once FORUMAX_PATH . 'includes/admin/Demo_Importer.php';
27 12 }
28 13
29 14 /**
30 15 * Add body class to admin pages.
@@ -32,11 +17,26 @@
32 17 * @param string $classes Body classes.
33 18 * @return string
34 19 */
35 20 public function body_class( $classes ) {
36 - // if current page is ?page=bbp-core in admin.
37 - 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'] ) {
38 23 $classes .= ' bbpc-forum-ui';
39 24 }
25 +
26 + // if has no pro plan.
27 + if ( forumax_is_premium() !== true ) {
28 + $classes .= ' bbpc-no-pro';
29 + }
30 +
31 + // if has no promax plan.
32 + if ( forumax_is_promax() !== true ) {
33 + $classes .= ' bbpc-no-promax';
34 + }
35 +
36 + if ( class_exists( 'BBPC_GEO_ROLES' ) ) {
37 + $classes .= ' bbpc-geo-roles';
38 + }
39 +
40 40 return $classes;
41 41 }
42 42 }