Reset name slug if doing bulk updates.
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 7 Oct 2019 19:34:54 +0000 (15:34 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 7 Oct 2019 19:34:54 +0000 (15:34 -0400)
For old events added in front end form that have no name_slug set.

index.php
models/admin/events/index.php
readme.txt

index b8e3da0..878927e 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Associate - Events Add-On
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.8.2
+ * Version: 1.8.3
  * Author: Chuck Scott
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersDatabaseEventsAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.8.2
+ * @version 1.8.3
  */
 
 // Check that we're being called by WordPress.
@@ -43,7 +43,7 @@ if (!defined('ABSPATH')) {
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.8.2');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.8.3');
 /**
  * Plugin DB Version
  */
index b2705f7..a4bbe56 100644 (file)
@@ -108,6 +108,8 @@ class GlmMembersAdmin_events_index extends GlmDataEvents
             $bulkEdit   = filter_var( $_REQUEST['bulkEdit'], FILTER_VALIDATE_INT, [ 'flags' => FILTER_FORCE_ARRAY ] );
             foreach ( $bulkEdit as $eventId ) {
                 $event     = $this->editEntry( $eventId );
+                // Update name slug for event
+                $this->updateSlug( $event['fieldData']['id'] );
                 $member_id = $event['fieldData']['ref_dest_id'];
                 switch ( $bulkAction ) {
                 case 'Approve':
index 5820331..66e9581 100755 (executable)
@@ -25,6 +25,9 @@ e.g.
 1. Activate the plugin through the 'Plugins' menu in WordPress
 
 == Changelog ==
+= 1.8.3 =
+* Update bulk methods to reset the name slug.
+
 = 1.8.2 =
 * Bugfix for new events from front end.