Text Domain: glmthemeoptions
minimum PHP Version : 5.4
*/
-
if ( ! defined( 'ABSPATH' ) ) {
die();
}
require_once get_template_directory().'/includes/defines.php';
+require_once 'includes/glma-addons.php';
+
use Glm\GlmThemeOptions\Defines;
+use Glm\GlmThemeOptions\GlmaAddons;
require_once 'utility.php';
private $glm_theme_options;
private static $instance = null;
private $utility;
- private $log;
+ private $glma_addons;
function __construct(){
$this->utility = new GlmThemeUtility();
$this->defines = new Glm\GlmThemeOptions\Defines\Defines();
+ $this->glma_addons = new Glm\GlmThemeOptions\GlmaAddons\GlmaAddons();
$this->glm_theme_options = $this->defines::$glm_theme_options;
}
public function glm_get_theme_options() {
if( get_option( $this->glm_theme_options ) ){
-
$data = get_option( $this->glm_theme_options );
- echo stripslashes($data);
}
wp_die();
// $this->utility::log( get_option($this->glm_theme_options ));
require_once 'menus.php';
$this->glm_init_theme_options();
$this->glm_create_ajax_actions();
+ $this->glma_addons->glm_load_addons();
}
}
}
--- /dev/null
+<?php
+namespace Glm\GlmThemeOptions\GlmaAddons;
+
+if (! class_exists( 'GlmaAddons') ){
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
+
+ class GlmaAddons{
+ private $glma_addons;
+
+ private function glm_addons_installed(){
+ return is_plugin_active( 'glm-member-db/index.php');
+ }
+
+ public function glm_load_addons(){
+ if( $this->glm_addons_installed() ){
+ $this->glma_addons = apply_filters("glm_list_addons",'');
+ }
+ }
+
+ }
+}
\ No newline at end of file
wp_enqueue_style("glm_theme_styles", get_template_directory_uri()."/dist/css/glm-app.min.css",false,"glm1570914435915.0.0");
wp_enqueue_script("jquery");
wp_enqueue_script("glm_theme_js", get_template_directory_uri()."/dist/js/glm-app.min.js", array("jquery"), "glm1570914435915.0.0", true);
-});
\ No newline at end of file
+});
<?php
namespace Glm\GlmThemeOptions\Defines;
if(!class_exists('Defines')){
+
class Defines{
public static $glm_options_url;
public static $glm_theme_options = "glm_theme_options";