* Plugin Name: GLM Members Database
* Plugin URI: http://www.gaslightmedia.com/
* Description: Gaslight Media Members Database.
- * Version: 2.9.11
+ * Version: 2.9.12
* Author: Gaslight Media
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* @package glmMembersDatabase
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @version 2.9.11
+ * @version 2.9.12
*/
/*
*
*/
-define('GLM_MEMBERS_PLUGIN_VERSION', '2.9.11');
+define('GLM_MEMBERS_PLUGIN_VERSION', '2.9.12');
define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.26');
// Check if plugin version is not current in WordPress option and if needed updated it
// $canEdit = current_user_can('glm_members_edit');
// Add a url for each member
- foreach ($list as $member) {
- $list[$member['id']]['member_slug'] = sanitize_title($member['name']);
+ if ( isset( $list) && is_array( $list ) ) {
+ foreach ($list as $member) {
+ $list[$member['id']]['member_slug'] = sanitize_title($member['name']);
+ }
}
// Compile template data
$vStripped = html_entity_decode(stripslashes(trim($v)));
- reset($categoryData);
- foreach ($categoryData as $c) {
+ if ( isset( $categoryData ) && is_array( $categoryData ) ) {
+ reset($categoryData);
+ foreach ($categoryData as $c) {
- $x = html_entity_decode(stripslashes(trim($c['name'])));
+ $x = html_entity_decode(stripslashes(trim($c['name'])));
- // If this entry matches - apply html entity decode in case string is encoded
- if ($x == $vStripped) {
+ // If this entry matches - apply html entity decode in case string is encoded
+ if ($x == $vStripped) {
- // Update the $cats array with the ID rather than the name and mark as found
- $cats[] = $c['id'];
+ // Update the $cats array with the ID rather than the name and mark as found
+ $cats[] = $c['id'];
+ }
}
}
* so $parentSelected
*/
$parentSelected = false;
+ if ( isset( $categoryData ) && is_array( $categoryData ) ) {
reset($categoryData);
while (list($k, $v) = each($categoryData)) {
}
}
+ }
}
if ($this->config['settings']['list_show_search_category']) {
// Add default flag as false to all entries
+ if ( isset( $categoryData ) && is_array( $categoryData ) ) {
foreach ($categoryData as $k=>$v) {
$categoryData[$k]['default'] = false;
+ }
}
// Check if a category has been submitted
// Access to Members menu
$this->addRoleCapability('glm_members_members',
array(
- 'administrator' => false,
+ 'administrator' => true,
'author' => false,
'contributor' => false,
'editor' => true,
// change the member detail photos grid structure depending
var images_container = $("#glm-member-detail-images-container");
- var foundation_version = window.Foundation.version;
-
- if( foundation_version.charAt(0) === "6" ){
- images_container.children('ul').removeClass('small-block-grid-1 medium-block-grid-2 large-block-grid-3');
- images_container.children('ul').addClass('row small-up-1 medium-up-2 large-up-3');
- images_container.children('ul').find('li').addClass('column');
+ // Check if Foundation exists first
+ if ( typeof window.Foundation != 'undefined' ) {
+ var foundation_version = window.Foundation.version;
+
+ if( foundation_version.charAt(0) === "6" ){
+ images_container.children('ul').removeClass('small-block-grid-1 medium-block-grid-2 large-block-grid-3');
+ images_container.children('ul').addClass('row small-up-1 medium-up-2 large-up-3');
+ images_container.children('ul').find('li').addClass('column');
+ }
}
// Replace all non-number special characters in a phone number with the designated infix