}
$existingPost = get_post(get_option($trimmedName));
$testSlug = get_post_field( 'post_name', $existingPost);
- //$existingSlug = $existingPost->post_name;
-
- $newSlug = str_replace(' ','-',strtolower($requiredPageInfo['name']));
-
- //$existingSlug = $this->get_post_data($newSlug, 'post_name', 'post_name');
+ $newSlug = sanitize_title($requiredPageInfo['name']);
$existingSlug = $this->verify_post_slug($newSlug);
// then it's either the first time this plugin is run on an outdated site or somehow the ID was
// deleted. Either way, replace the option value with whatever is the ID of the page matching
// that slug. The slug is checked by translating the page title.
- //$existingPage = get_post(url_to_postid(str_replace(' ','-',strtolower($requiredPageInfo['name']))));
- //$existingPage = get_post('members-detail');
- //echo '-- PROCESSING PAGE'.str_replace(' ','-',strtolower($requiredPageInfo['name']));
-
- if ($newSlug == $existingSlug) {
- //echo $existingSlug;
- //echo 'DUPLICATE PAGE'.$existingSlug;
-
+ if ($newSlug == $existingSlug) {
$existingID = $this->get_post_id_by_slug($newSlug);
update_option($trimmedName, $existingID);
// Otherwise create a new page
}
}
} else {
-
-// echo " ((( slugpage ID: ".$existingID.")))";
-// echo " ((( testslug: ".$testSlug.")))";
-// echo " ((( existingslug: ".$existingSlug.")))";
-// echo '-- EXISTING PAGE '.$existingPost->ID.' - '.$existingPost->post_name;
+ // No page created
}
}
}
}
.glm-member-db-list-grid-view #glm-member-list-filters-close {
- background-color: grey;
+ background-color: rgba(0,0,0,0.25);
height: 40px;
line-height: 40px;
color: white;
padding-top: 50px;
border-top: 0;
}
+#glm-member-list-filters-box .glm-member-search h3 {
+ color: black;
+}
.glm-member-db-list-grid-view .glm-member-search:before {
background-color: lightgrey;
content: '';
color: white;
}
#glm-member-detail-contact-info {
- background-color: #2C296D;
+ background-color: #2c296d;
padding: 15px;
color: white;
font-size: 18px;
//echo $pageName;
$pageID = get_option(GLM_MEMBERS_PLUGIN_OPTION_PREFIX.$pageData['underscored_name']);
$pageData['id'] = $pageID;
- $pageData['slug'] = str_replace(' ','-',strtolower($pageData['name']));
+ $pageData['slug'] = sanitize_title($pageData['name']);;
echo get_the_title($pageID);
//$pageData['name'] = single_post_title(get_post(get_option($pageID)));
}
$alphaList = $this->getAlphaList(' AND '.$where, $alphaSelected);
}
-
- // Check whether search filters open by default
- if ($this->config['settings']['list_show_search_filters_opened'] == 1) {
- $filtersOpened = true;
- }
-
- // Check whether map opens by default
- if ($this->config['settings']['list_map_opened'] == 1) {
- $mapOpened = true;
- }
/*
* Check for which view file to use, else default to bars
*/
- $view = "front/members/index.html";
+ $view = "front/members/list.html";
if (isset($actionData['request']['view']) &&
- strtolower($actionData['request']['view']) == "grid") {
+ strtolower($actionData['request']['view']) == "grid") {
$view = "front/members/grid.html";
}
* - 'associate' : this will make the page a child of the GLM Associate page
* for management purposes
*
- * When in doubt just use 'associate'
+ * When in doubt just use '0'
*
*/
$glmMembersRequiredPages = array(
// These should be in GLM Associate
- 'GLM Associate' => array(
- 'name' => 'GLM Associate',
- 'content' => '',
- 'parent' => '0',
- 'underscored_name' => 'glm_associate_id',
- ),
+// 'GLM Associate' => array(
+// 'name' => 'GLM Associate',
+// 'content' => '',
+// 'parent' => '0',
+// 'underscored_name' => 'glm_associate_id',
+// ),
// These should be in GLM Members
'Members Only' => array(
'name' => 'Members Only',
'Members List' => array(
'name' => 'Members List',
'content' => '[glm-members-list]',
- 'parent' => 'associate',
+ 'parent' => '0',
'underscored_name' => 'members_list_id',
),
- 'Members Detail' => array(
- 'name' => 'Members Detail',
+ 'Member Detail' => array(
+ 'name' => 'Member Detail',
'content' => '[glm-member-detail]',
- 'parent' => 'associate',
+ 'parent' => '0',
'underscored_name' => 'member_detail_id',
)
);