Added function calls to clear shortcode cashe when packages are added, updated, or...
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 23 May 2017 19:21:38 +0000 (15:21 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 23 May 2017 19:21:38 +0000 (15:21 -0400)
models/admin/member/packaging.php
models/admin/packaging/index.php

index ab889ae..8638cd9 100644 (file)
@@ -193,6 +193,8 @@ class GlmMembersAdmin_member_packaging extends GlmDataPackages
                     // Tell the template we're going to be editing.
                     $option = 'edit';
 
+                    glmClearShortcodeCache();
+
                 // Otherwise, the package didn't successfully submit
                 } else {
 
@@ -216,6 +218,7 @@ class GlmMembersAdmin_member_packaging extends GlmDataPackages
                 break;
 
             case 'update':
+
                 // Get the original Package Status. Before the update.
                 $old_package_status = $this->wpdb->get_var(
                     $this->wpdb->prepare(
@@ -249,6 +252,8 @@ class GlmMembersAdmin_member_packaging extends GlmDataPackages
                     // Tell the template the package was updated
                     $packageUpdated = true;
 
+                    glmClearShortcodeCache();
+
                 // Otherwise it didn't update, tell the template and let them try again
                 } else {
                     $packageError = true;
@@ -272,6 +277,8 @@ class GlmMembersAdmin_member_packaging extends GlmDataPackages
                 if ($packageID > 0) {
                     $this->deleteEntry($packageID, true);
                     $packageDeleted = true;
+
+                    glmClearShortcodeCache();
                 }
 
                 // Look for matching package elements
index 8cb4806..1bc8786 100644 (file)
@@ -180,6 +180,8 @@ class GlmMembersAdmin_packaging_index extends GlmDataPackages
                     // Tell the template we're going to be editing.
                     $option = 'edit';
 
+                    glmClearShortcodeCache();
+
                 // Otherwise, the package didn't successfully submit
                 } else {
 
@@ -225,9 +227,12 @@ class GlmMembersAdmin_packaging_index extends GlmDataPackages
 
                     // Tell the template the package was updated
                     $packageUpdated = true;
+
                     // Get the package prepared for editing
                     $packageInfo = $this->editEntry($packageID);
 
+                    glmClearShortcodeCache();
+
                 // Otherwise it didn't update, tell the template and let them try again
                 } else {
                     $packageError = true;
@@ -251,6 +256,8 @@ class GlmMembersAdmin_packaging_index extends GlmDataPackages
                 if ($packageID > 0) {
                     $this->deleteEntry($packageID, true);
                     $packageDeleted = true;
+
+                    glmClearShortcodeCache();
                 }
 
                 // Look for matching package elements