From 53b16d32174d9fed330d05dfa60cb00380696edf Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 9 Feb 2016 11:11:51 -0500 Subject: [PATCH] Fixed some undefined references encountered during Add-On registration for when certain things aren't setup in the Add-On --- glm-member-db-sample.php | 8 +++++--- setup/shortcodes.php | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/glm-member-db-sample.php b/glm-member-db-sample.php index a89a81c..11aef75 100644 --- a/glm-member-db-sample.php +++ b/glm-member-db-sample.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Database Sample * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 0.0.1 + * Version: 0.0.2 * Author: Chuck Scott * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -53,7 +53,7 @@ * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_SAMPLE_PLUGIN_VERSION', '0.0.1'); +define('GLM_MEMBERS_SAMPLE_PLUGIN_VERSION', '0.0.2'); // define('GLM_MEMBERS_SAMPLE_PLUGIN_DB_VERSION', '0.0.1'); // This is the minimum version of the GLM Members DB plugin require for this plugin. @@ -180,7 +180,7 @@ function glmMembersRegisterSample($addOns) { ); // If we have database tables for this plugin/addon, provide that data also - if ($havePluginDatabase) { + if ($GLOBALS['havePluginDatabase']) { $addOns[GLM_MEMBERS_SAMPLE_PLUGIN_SLUG]['database'] = array( 'dbPrefix' => GLM_MEMBERS_SAMPLE_PLUGIN_DB_PREFIX, 'dbCurrentVersion' => GLM_MEMBERS_SAMPLE_PLUGIN_DB_VERSION, @@ -188,6 +188,8 @@ function glmMembersRegisterSample($addOns) { 'dbScriptPath' => GLM_MEMBERS_SAMPLE_PLUGIN_DB_SCRIPTS, 'dbVersions' => $GLOBALS['glmMembersSampleDbVersions'] ); + } else { + $addOns[GLM_MEMBERS_SAMPLE_PLUGIN_SLUG]['database'] = false; } // Return the array with our data added diff --git a/setup/shortcodes.php b/setup/shortcodes.php index dd7f9dc..bcb28fa 100644 --- a/setup/shortcodes.php +++ b/setup/shortcodes.php @@ -74,4 +74,40 @@ * ... additional short-codes * ) * + * Shortcode descriptions sample + * + * + * [glm-members-sample-shortcode] + *   + * + *

+ * Displays something related to this add-on. + *

+ * + * + * + *   + * type="{types}" + * + *

+ * The "type" attribute is used to select the type of data to be displayed. + * Below is a list of available list types. + *

+ *

+ * + * + * + * + *
List Types
oneType One
twoType Two
+ *

+ * + * + * + * */ + +$glmMembersSampleShortcodes = array( +); + +$glmMembersSampleShortcodesDescription = ''; + -- 2.17.1