<?php
/**
- * Plugin Name: GLM Members Database Packaging
+ * Plugin Name: GLM Assoicate - Packaging Add-On
* Plugin URI: http://www.gaslightmedia.com/
- * Description: Gaslight Media Members Database.
+ * Description: Gaslight Media GLM Associate Packaging database addd-on.
* Version: 1.2.19
* Author: Gaslight Media
* Author URI: http://www.gaslightmedia.com/
*/
/**
- * Gaslight Media Members Database Packaging Add-On
+ * Gaslight Media GLM Associate - Packaging Add-On
* Index
*
* PHP version 5.5
$memberName = false;
$option = false;
$error = false;
+ $indexPackages = false;
// Load Notifications from the helper classes
include_once GLM_MEMBERS_PACKAGING_PLUGIN_CLASS_PATH . '/helper/notification.php';
$havePackage = true;
$packageUpdated = true;
+ // Flag that a search engine update is needed
+ $indexPackages = true;
+
// Tell the template we're going to be editing.
$option = 'edit';
// Tell the template the package was updated
$packageUpdated = true;
+ // Flag that a search engine update is needed
+ $indexPackages = true;
+
glmClearShortcodeCache();
// Otherwise it didn't update, tell the template and let them try again
$this->deleteEntry($packageID, true);
$packageDeleted = true;
+ // Flag that a search engine update is needed
+ $indexPackages = true;
+
glmClearShortcodeCache();
}
}
+
+
+ // If we need to re-index the packages list page(s)
+ if ($indexPackages) {
+
+ // Get a list of all published pages that have a package list shortcode
+ $prefix = $this->wpdb->get_blog_prefix();
+ $shortcodePages = $this->wpdb->get_results("
+ SELECT ID, post_title, post_name
+ FROM ".$prefix."posts
+ WHERE post_status = 'publish'
+ AND post_content LIKE '%[glm-members-packaging-list%'
+ ", ARRAY_A);
+
+ // If there's any pages with this shortcode
+ if ($shortcodePages != NULL && is_array($shortcodePages) && count($shortcodePages) > 0) {
+ foreach ($shortcodePages as $shortcodePage) {
+
+ // Build the URL to that page and ask for it to be indexed.
+ $pageUrl = GLM_MEMBERS_SITE_BASE_URL.$shortcodePage['post_name'].'/';
+ $result = apply_filters( 'glm_member_db_common_search_indexurl', $pageUrl );
+
+ }
+ }
+ }
+
// Compile template data
$templateData = array(
'havePackages' => $havePackages,
-=== Gaslight Media Member Database Packaging Child Plugin ===
+=== GLM Associate - Packaging Add-On ===
Contributors: cscott@gaslightmedia.com
Donate link: http://www.gaslightmedia.com
Tags: Gaslight Media,Plugin,Members Packaging
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
-This is the Gaslight Media Members Database Packaging Child Plugin.
+This is the Gaslight Media GLM Associate Packaging Add-On.
== Description ==
-The Gaslight Media Members Database Packaging Child Plugin is an add-on to the Gaslight Media Members Database,
-which is required to install and run this plugin
+The Gaslight Media GLM Associate Packaging Add-On is a child plugin to the Gaslight Media GLM Associate Members plugin
+which is required to install and run this plugin.
== Installation ==
== Changelog ==
+
+= (pending) =
+* Added filter to update search engine if GLM Associate - OpenSearchServer Add-On is installed and active.
+
= 1.2.18 =
* Add management option for member message and for overriding moderated member
packages.