From: Steve Sutton Date: Mon, 17 Jun 2019 17:46:19 +0000 (-0400) Subject: Call standard template params in each plugin X-Git-Tag: v2.12.4~1^2~10 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f0f0c824227d9b7b5e7a1464eb351f9242b78d32;p=WP-Plugins%2Fglm-member-db.git Call standard template params in each plugin So each plugin can have standard params in smarty. --- diff --git a/controllers/admin.php b/controllers/admin.php index cbbfe929..3be5f690 100755 --- a/controllers/admin.php +++ b/controllers/admin.php @@ -385,6 +385,14 @@ class glmMembersAdmin extends GlmPluginSupport // Add standard template parameters require GLM_MEMBERS_PLUGIN_SETUP_PATH . '/standardTemplateParams.php'; + // Add standard template parameters for plugins + foreach ( $this->config['addOns'] as $a ) { + $stdTempFile = $a['dir'].'/setup/standardTemplateParams.php'; + if ( is_file( $stdTempFile ) ) { + require_once $stdTempFile; + } + } + // Add data from model to Smarty template if ( is_array( $results['data'] ) && count( $results['data'] ) > 0 ) { foreach ( $results['data'] as $k=>$d ) { @@ -1080,6 +1088,13 @@ class glmMembersAdmin extends GlmPluginSupport // Add standard template parameters require GLM_MEMBERS_PLUGIN_SETUP_PATH . '/standardTemplateParams.php'; + // Add standard template parameters for plugins + foreach ( $this->config['addOns'] as $a ) { + $stdTempFile = $a['dir'].'/setup/standardTemplateParams.php'; + if ( is_file( $stdTempFile ) ) { + require_once $stdTempFile; + } + } // Add data from model to Smarty template if ( is_array( $results['data'] ) && count( $results['data'] ) > 0 ) { foreach ( $results['data'] as $k=>$d ) {