Changed 'name' to 'title' for reqPages
authorlaury <laury@gaslightmedia.com>
Mon, 16 May 2016 13:31:52 +0000 (09:31 -0400)
committerlaury <laury@gaslightmedia.com>
Mon, 16 May 2016 13:31:52 +0000 (09:31 -0400)
classes/glmPluginSupport.php
models/admin/management/index.php
setup/requiredPages.php

index 211ed3c..f2303d0 100644 (file)
@@ -523,8 +523,7 @@ class GlmPluginSupport
                 $postParent = '0';
             }
             $existingPost = get_post(get_option($trimmedName));
-            $testSlug = get_post_field( 'post_name', $existingPost);
-            $newSlug = sanitize_title($requiredPageInfo['name']);
+            $newSlug = sanitize_title($requiredPageInfo['title']);
             $existingSlug = $this->verify_post_slug($newSlug);
 
 
@@ -543,7 +542,7 @@ class GlmPluginSupport
                     // Put together the new page, then update the option with the new ID
                     $templateUsed = isset($requiredPageInfo['template']) ? $requiredPageInfo['template'] : 'index.php';
                     $new_id = $this->insertReqPage(
-                            $requiredPageInfo['name'],
+                            $requiredPageInfo['title'],
                             $requiredPageInfo['content'],
                             'publish',
                             'page',
index fef2b24..ecf7508 100644 (file)
@@ -131,7 +131,7 @@ class GlmMembersAdmin_management_index extends GlmDataSettingsGeneral
                     //echo $pageName;
                     $pageID = get_option(GLM_MEMBERS_PLUGIN_OPTION_PREFIX.$pageData['underscored_name']);
                     $pageData['id'] = $pageID;
-                    $pageData['slug'] = sanitize_title($pageData['name']);;
+                    $pageData['slug'] = sanitize_title($pageData['title']);;
                     echo get_the_title($pageID);
                     //$pageData['name'] = single_post_title(get_post(get_option($pageID)));
                 }
index b26434f..37995a4 100644 (file)
@@ -47,22 +47,22 @@ $glmMembersRequiredPages = array(
 //    ),
     // These should be in GLM Members
     'Members Only' => array(
-        'name' => 'Members Only',
+        'title' => 'Members Only',
         'content' => 'This page and any child beneath it will automatically be locked to Members Only with the members-only-template.',
         'parent' => '0',
         'template' => 'glm-members-only-template.php',
-        'underscored_name' => 'members_only_id',
+        'underscored_title' => 'members_only_id',
     ),
     'Members List' => array(
-        'name' => 'Members List',
+        'title' => 'Members List',
         'content' => '[glm-members-list]',
         'parent' => '0',
-        'underscored_name' => 'members_list_id',
+        'underscored_title' => 'members_list_id',
     ),
     'Member Detail' => array(
-        'name' => 'Member Detail',
+        'title' => 'Member Detail',
         'content' => '[glm-member-detail]',
         'parent' => '0',
-        'underscored_name' => 'member_detail_id',
+        'underscored_title' => 'member_detail_id',
     )
 );