Updated section that can add Management and Settings parameters when registering...
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 6 Mar 2018 17:44:08 +0000 (12:44 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 6 Mar 2018 17:44:08 +0000 (12:44 -0500)
SAMPLE_index.php

index 54c7d58..a6558a7 100644 (file)
@@ -142,11 +142,24 @@ if (is_file({definedPrefix}_PLUGIN_DB_SCRIPTS.'/dbVersions.php')) {
     require_once {definedPrefix}_PLUGIN_DB_SCRIPTS.'/dbVersions.php';
 }
 
-// Load Add-On Management Settings data
-/* None - Need to figure out a smooth way to do this.
-${camelcasePrefix}ManagementSettings = $wpdb->get_row( "SELECT * FROM ".{definedPrefix}_PLUGIN_DB_PREFIX."management WHERE id = 1", ARRAY_A );
-unset(${camelcasePrefix}ManagementSettings['id']);
-*/
+/*
+ * Load Add-On Management Settings data
+ *
+ * To have management and settings data from this add-on added to the main plugin config,
+ * uncomment the two sections and fix anything that's need to be corrected.
+ *
+ * Then add the data to the "config" array under "// Add this add-on to the add-ons array" below.
+ */
+
+// Management
+// ${camelcasePrefix}ManagementSettings = $wpdb->get_row( "SELECT * FROM ".{definedPrefix}_PLUGIN_DB_PREFIX."management WHERE id = 1", ARRAY_A );
+// unset(${camelcasePrefix}ManagementSettings['id']);
+
+// Settings
+// ${camelcasePrefix}SettingsTerms = $wpdb->get_row( "SELECT * FROM ".{definedPrefix}_PLUGIN_DB_PREFIX."settings_terms WHERE id = 1", ARRAY_A );
+// unset(${camelcasePrefix}SettingsTerms['id']);
+
+
 
 function {camelcasePrefix}RegisterAddOn($addOns) {
 
@@ -158,6 +171,8 @@ function {camelcasePrefix}RegisterAddOn($addOns) {
         'slug' => {definedPrefix}_PLUGIN_SLUG,
         'actions' => $GLOBALS['{camelcasePrefix}AddOnValidActions'],
         'config' => array(
+//            'settings' => $GLOBALS['{camelcasePrefix}ManagementSettings'],
+//            'terms' => $GLOBALS['{camelcasePrefix}SettingsTerms']
         ),
         'shortcodes' => $GLOBALS['{camelcasePrefix}Shortcodes'],
         'shortcodesDescription' => $GLOBALS['{camelcasePrefix}ShortcodesDescription']