*/
public function __construct ($wpdb, $config)
{
-
+
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
}
-
+
// Save WordPress Database object
$this->wpdb = $wpdb;
}
}
-
+
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
}
-
+
}
/**
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
}
-
+
// Get the model action
if (isset($_REQUEST['glm_action']) && $_REQUEST['glm_action'] != '') {
$glmAction = sanitize_text_field($_REQUEST['glm_action']);
// Generate output from model data and view
$smarty->template->display($viewFile);
-
+
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
}
-
+
exit; // Need to test if this is here for a reason!
wp_die();
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
}
-
+
// Enque admin scripts and css here so that only happens when we're doing something
$this->glmMembersAdminScripts();
$className = 'GlmMembersAdmin_' . $menuItem . '_' . $action;
$loopTracking .= "<p>Loop: $loopCheck<br>Model: $modelName<br>Class: $className</p>";
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- trigger_error("Notice: Model: ".$modelName, E_USER_NOTICE);
+ trigger_error("Model: ".$modelName, E_USER_NOTICE);
}
// Create hook to add page tabs by add-on plugins
$badView = false;
if ($view) {
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
- trigger_error("Notice: View: ".$view, E_USER_NOTICE);
+ trigger_error("View: ".$view, E_USER_NOTICE);
}
// Get the specified view file - check theme first
$smarty->templateAssign('errorMsg', $errorMsg);
}
- // If view debug has been requested
- if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
-
- $x = $smarty->template->getTemplateVars();
-
- }
-
// Update the Smarty view path - *** NEEED TO FIX THIS TO SUPPORT THEME VIEWS SOMEHOW ****
$smarty->template->addTemplateDir($viewPath);
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
+ $smarty->template->display( 'admin/smartyDebug.html');
}
-
+
if ( $returnOutput ) {
return $output;
}
if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
}
-
+
// Save WordPress Database object
$this->wpdb = $wpdb;
// Add filters for use anywhere else (apply_filter). Will have to add this to index.php eventually
add_filter('glmMembersFrontScriptsFilter',array($this,'glmMembersFrontScripts'));
add_action('glmMembersFrontCSSFilter',array($this,'glmMembersFrontCSS'));
-
+
if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
}
-
+
}
/**
if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
}
-
+
// Start with no cache_code - This prevents caching for subordinate controller hits
$cache_code = false;
if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG_VERBOSE) {
trigger_error(glmAssociateMemoryUsage(),E_USER_NOTICE);
}
-
+
return $out;
}