Update search plugin for post updates
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 14 Jun 2019 16:44:07 +0000 (12:44 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 14 Jun 2019 16:44:07 +0000 (12:44 -0400)
Don't update oss search for posts when menu items are saved.

index.php
setup/adminHooks.php

index 7fe037f..9d293db 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Associate - OpenSearchServer Add-On
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 2.0.2
+ * Version: 2.0.3
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersDatabaseSearchAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 2.0.1
+ * @version 2.0.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_SEARCH_PLUGIN_VERSION', '2.0.2');
+define('GLM_MEMBERS_SEARCH_PLUGIN_VERSION', '2.0.3');
 define('GLM_MEMBERS_SEARCH_PLUGIN_DB_VERSION', '0.0.5');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index b367a7c..ba0e4c6 100644 (file)
@@ -100,6 +100,10 @@ function glm_member_db_admin_post_updated( $post_id, $post_after, $post_before )
 
     global $config;
 
+    if ( $post_after->post_type == 'nav_menu_item' ) {
+        return false;
+    }
+
 
     // Load and instatiate the glmSearch class
     require_once GLM_MEMBERS_SEARCH_PLUGIN_CLASS_PATH.'/glmSearch.php';