From 4dc6ecc3a5f90b6c4b89a5587f2724625f93c13d Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 17 Oct 2019 23:08:51 -0400 Subject: [PATCH] testing out the glma filters --- admin/glm-theme-options.php | 10 ++++++---- admin/includes/glma-addons.php | 21 +++++++++++++++++++++ functions.php | 2 +- includes/defines.php | 1 + 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 admin/includes/glma-addons.php diff --git a/admin/glm-theme-options.php b/admin/glm-theme-options.php index a164b70..9a4d03e 100644 --- a/admin/glm-theme-options.php +++ b/admin/glm-theme-options.php @@ -10,12 +10,14 @@ License: GPL-2.0+ 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'; @@ -25,11 +27,12 @@ if(!class_exists('GlmThemOptions')){ 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; } @@ -57,9 +60,7 @@ if(!class_exists('GlmThemOptions')){ 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 )); @@ -75,6 +76,7 @@ if(!class_exists('GlmThemOptions')){ require_once 'menus.php'; $this->glm_init_theme_options(); $this->glm_create_ajax_actions(); + $this->glma_addons->glm_load_addons(); } } } diff --git a/admin/includes/glma-addons.php b/admin/includes/glma-addons.php new file mode 100644 index 0000000..800ce85 --- /dev/null +++ b/admin/includes/glma-addons.php @@ -0,0 +1,21 @@ +glm_addons_installed() ){ + $this->glma_addons = apply_filters("glm_list_addons",''); + } + } + + } +} \ No newline at end of file diff --git a/functions.php b/functions.php index d98a69c..3dd7d75 100644 --- a/functions.php +++ b/functions.php @@ -19,4 +19,4 @@ add_action("wp_enqueue_scripts", function(){ 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 +}); diff --git a/includes/defines.php b/includes/defines.php index ec00506..e4c251f 100644 --- a/includes/defines.php +++ b/includes/defines.php @@ -1,6 +1,7 @@