From: Steve Sutton Date: Fri, 14 Jun 2019 17:09:35 +0000 (-0400) Subject: Update what causes oss to re-crawl. X-Git-Tag: v2.0.4^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=2cba3b6f33009c2f78da99c15778ad359162b33a;p=WP-Plugins%2Fglm-member-db-search.git Update what causes oss to re-crawl. Only re-crawl if pages or post are updated. --- diff --git a/index.php b/index.php index 9d293db..105e921 100644 --- 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.3 + * Version: 2.0.4 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -19,7 +19,7 @@ * @package glmMembersDatabaseSearchAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 2.0.3 + * @version 2.0.4 */ // Check that we're being called by WordPress. @@ -43,7 +43,10 @@ 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.3'); +define('GLM_MEMBERS_SEARCH_PLUGIN_VERSION', '2.0.4'); +/** + * Db Version + */ 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. diff --git a/readme.txt b/readme.txt index 868033b..94e8be2 100644 --- a/readme.txt +++ b/readme.txt @@ -15,7 +15,7 @@ This is the Gaslight Media Members Database Search Child Plugin. The Gaslight Media Members Database Search Child Plugin is an add-on to the Gaslight Media Members Database, which is required to install and run this plugin. -This plugin provides a shortcode that can display a search form and search results on a page. You can also +This plugin provides a shortcode that can display a search form and search results on a page. You can also create a custom form anywhere on the site provided that the form action targets a search page that includes the [glm-members-search] shortcode and includes the following submit parameters. @@ -24,7 +24,7 @@ the [glm-members-search] shortcode and includes the following submit parameters. == Installation == -Use normal Wordpress plugin installation proceedures. +Use normal Wordpress plugin installation proceedures. e.g. @@ -32,6 +32,9 @@ e.g. 1. Activate the plugin through the 'Plugins' menu in WordPress == Changelog == += 2.0.3 = +* Only update OSS crawler when Post or Pages are updated. No other post_types. + = 2.0.2 = * Updated create database script to correct version. @@ -62,11 +65,11 @@ is requested to add, update, or remove a `Page or Post as appropriate. These cha so a search will return the updated results without having to wait for a re-crawl of the site. * Updated filters for indexing or removing a URL -The glm_member_db_common_search_indexurl and glm_member_db_common_search_removeurl filters have been +The glm_member_db_common_search_indexurl and glm_member_db_common_search_removeurl filters have been enhanced so that search results are immediately affected. * Requires Open Search Server v1.5 or later -This release has been tested with OpenSearchServer v1.5.14 and may not function properly with earlier versions. +This release has been tested with OpenSearchServer v1.5.14 and may not function properly with earlier versions. = 1.2.2 = diff --git a/setup/adminHooks.php b/setup/adminHooks.php index ba0e4c6..e2b67ec 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -100,7 +100,12 @@ function glm_member_db_admin_post_updated( $post_id, $post_after, $post_before ) global $config; - if ( $post_after->post_type == 'nav_menu_item' ) { + $type = $post_after->post_type; + + if ( !in_array( $type, array( 'page', 'post' ) ) ) { + if ( GLM_MEMBERS_PLUGIN_ADMIN_DEBUG ) { + trigger_error( 'OSS Abort', E_USER_NOTICE ); + } return false; }