Replacing all sample text with events
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 15 Feb 2016 16:22:45 +0000 (11:22 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 15 Feb 2016 16:22:45 +0000 (11:22 -0500)
15 files changed:
classes/data/dataSample.php
models/admin/members/sample.php
models/admin/sample/index.php
models/admin/sample/more.php
setup/adminHooks.php
setup/adminTabs.php
setup/databaseScripts/SAMPLE.create_database_V0.0.1.sql
setup/databaseScripts/SAMPLE.dbVersions.php
setup/databaseScripts/SAMPLE.update_database_V0.0.2.php
setup/frontHooks.php
setup/hooksHelp.html
setup/permissions.php
setup/rolesAndCapabilities.php
setup/shortcodes.php
setup/validActions.php

index 052a759..648e2d6 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * GLM Member-DB WordPress Add-On Plugin
- * Data Class Sample
+ * Data Class Events
  *
  * PHP version 5.3
  *
@@ -9,25 +9,14 @@
  * @package  GLM Member-DB
  * @author   Chuck Scott <cscott@gaslightmedia.com>
  * @license  http://www.gaslightmedia.com Gaslightmedia
- * @release  SVN: $Id: dataSample.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @release  SVN: $Id: dataEvents.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  Data fields in this file are sample only.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 // Member Info Data required
 require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php');
 
 /**
- * GlmDataSample class
+ * GlmDataEvents class
  *
  * PHP version 5
  *
@@ -38,7 +27,7 @@ require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php');
  *          @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott
  *          Exp $
  */
-class GlmDataSample extends GlmDataAbstract
+class GlmDataEvents extends GlmDataAbstract
 {
 
     /**
@@ -121,7 +110,7 @@ class GlmDataSample extends GlmDataAbstract
         /*
          * Table Name
          */
-        $this->table = GLM_MEMBERS_SAMPLE_PLUGIN_DB_PREFIX . 'sampletable';
+        $this->table = GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'eventstable';
 
         /*
          * Table Data Fields
@@ -169,4 +158,4 @@ class GlmDataSample extends GlmDataAbstract
 
 }
 
-?>
\ No newline at end of file
+?>
index ed2fac9..9f69514 100644 (file)
@@ -16,7 +16,7 @@
 // Load Contacts data abstract
 //require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
 
-class GlmMembersAdmin_members_sample // extends GlmDataContacts
+class GlmMembersAdmin_members_events // extends GlmDataContacts
 {
 
     /**
@@ -104,7 +104,7 @@ class GlmMembersAdmin_members_sample // extends GlmDataContacts
     public function modelAction($actionData = false)
     {
 
-        $displayData = 'This is the Sample "Members" "Sample" model talking to you from inside WordPress.';
+        $displayData = 'This is the Events "Members" "Events" model talking to you from inside WordPress.';
 
         // Compile template data
         $templateData = array(
@@ -115,7 +115,7 @@ class GlmMembersAdmin_members_sample // extends GlmDataContacts
         return array(
                 'status' => true,
                 'modelRedirect' => false,
-                'view' => 'admin/members/sample.html',
+                'view' => 'admin/members/events.html',
                 'data' => $templateData
         );
 
index 5c321df..5c43a53 100644 (file)
@@ -16,7 +16,7 @@
 // Load Contacts data abstract
 //require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
 
-class GlmMembersAdmin_sample_index // extends GlmDataContacts
+class GlmMembersAdmin_events_index // extends GlmDataContacts
 {
 
     /**
@@ -104,7 +104,7 @@ class GlmMembersAdmin_sample_index // extends GlmDataContacts
     public function modelAction($actionData = false)
     {
 
-        $displayData = 'Hello, World! This is the Sample Add-On "sample" model talking to you from inside WordPress.';
+        $displayData = 'Hello, World! This is the Events Add-On "events" model talking to you from inside WordPress.';
 
         // Compile template data
         $templateData = array(
@@ -115,7 +115,7 @@ class GlmMembersAdmin_sample_index // extends GlmDataContacts
         return array(
                 'status' => true,
                 'modelRedirect' => false,
-                'view' => 'admin/sample/index.html',
+                'view' => 'admin/events/index.html',
                 'data' => $templateData
         );
 
index b814759..07de2ea 100644 (file)
@@ -16,7 +16,7 @@
 // Load Contacts data abstract
 //require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
 
-class GlmMembersAdmin_sample_more // extends GlmDataContacts
+class GlmMembersAdmin_events_more // extends GlmDataContacts
 {
 
     /**
@@ -104,7 +104,7 @@ class GlmMembersAdmin_sample_more // extends GlmDataContacts
     public function modelAction($actionData = false)
     {
 
-        $displayData = 'Welcome to more information!<br>This is the Sample Add-On "sample" model with action "more" talking to you from inside WordPress.';
+        $displayData = 'Welcome to more information!<br>This is the Events Add-On "events" model with action "more" talking to you from inside WordPress.';
 
         // Compile template data
         $templateData = array(
@@ -115,7 +115,7 @@ class GlmMembersAdmin_sample_more // extends GlmDataContacts
         return array(
                 'status' => true,
                 'modelRedirect' => false,
-                'view' => 'admin/sample/more.html',
+                'view' => 'admin/events/more.html',
                 'data' => $templateData
         );
 
index 8c36dfc..6e7ad8e 100644 (file)
  * @link     http://dev.gaslightmedia.com/
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  This file is used to create hooks into the main plugin or other
- *  add-ons. If no such hooks are needed, this file may be omitted.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 /*
  * Place Misc Hooks and Filters here. If this file exists, it will be included
  * by the add-on main plugin script.
index 9f22164..e3cb1a7 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Gaslight Media Members Database
- * GLM Members DB - Sample Add-on - Admin Tabs
+ * GLM Members DB - Events Add-on - Admin Tabs
  *
  * PHP version 5.5
  *
  * @link     http://dev.gaslightmedia.com/
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  This file is used to add tabs to existing admin pages in the main
- *  plugin or other add-ons. If this add-on does not create additional
- *  tabs, this file should be omitted.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 /*
  * To add a new tab to an existing Member DB page use a block
  * like this and replace the {} parameters.
@@ -50,9 +37,9 @@ add_filter('glm-member-db-add-tab-for-members',
     function($addOnTabs) {
         $newTabs = array(
             array(
-                'text' => 'Sample',
+                'text' => 'Events',
                 'menu' => 'members',
-                'action' => 'sample'
+                'action' => 'events'
             )
         );
         $addOnTabs = array_merge($addOnTabs, $newTabs);
index ae98344..2671913 100644 (file)
@@ -1,11 +1,11 @@
--- Gaslight Media Members Database - Sample 
+-- Gaslight Media Members Database - Events
 -- File Created: 12/02/15 15:27:15
 -- Database Version: 0.0.1
 -- Database Creation Script
--- 
+--
 -- This file is called to create a new set of tables for this
 -- add-on for the most receint database version for this add-on.
--- 
+--
 -- There should only be one such file in this directory
 --
 -- To permit each query below to be executed separately,
 
 
 -- **********************************************************************
---  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
+--  NOTE: THIS IS A EVENTS FILE - DO NOT USE UNMODIFIED
 --
---  Please change all references to sample, Sample, or SAMPLE to a name
+--  Please change all references to events, Events, or EVENTS to a name
 --  appropriate for your new Add-On.
 --
---  Tables and queries in this file are sample only.
+--  Tables and queries in this file are events only.
 --
 --  Remove this message before using this file in production!
 -- **********************************************************************/
 
 
--- Sample Management Settings
+-- Events Management Settings
 CREATE TABLE {prefix}management (
   id INT NOT NULL AUTO_INCREMENT,
-  canonical_sample_page TINYTEXT NULL,          -- Canonical page slug for detail
+  canonical_events_page TINYTEXT NULL,          -- Canonical page slug for detail
   PRIMARY KEY (id)
 );
 
 ----
 
--- Set default sample management entry
+-- Set default events management entry
 INSERT INTO {prefix}management
-    ( id, canonical_sample_page )
+    ( id, canonical_events_page )
    VALUES
-    ( 1, 'sample data' )
+    ( 1, 'events data' )
 ;
 
index c2b6a9f..5e76b0e 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Gaslight Media Members Database
- * GLM Members Sample DB Versions
+ * GLM Members Events DB Versions
  *
  * PHP version 5.5
  *
  * @link     http://dev.gaslightmedia.com/
  */
 
-
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  This file lists all versions of the database tables for this add-on.
- *  The last entry in the array below should be for the most recent
- *  version and should match the "create_database_V..." file in this
- *  directory.
- *
- *  NOTE: When first creating a new add-on with database tables, there
- *  should only be one line in the array below and there should be no
- *  "update_database..." files in this directory.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
-
-$glmMembersSampleDbVersions = array(
+$glmMembersEventsDbVersions = array(
             '0.0.1' => array('version' => '0.0.1', 'tables' => 2),
             '0.0.2' => array('version' => '0.0.2', 'tables' => 3)
 );
index c4ac161..a07182c 100644 (file)
@@ -1,49 +1,31 @@
 <?php
 /*
- * Gaslight Media Members Database - Sample Add-On
+ * Gaslight Media Members Database - Events Add-On
  *
  * Database Update Script for version 0.0.2
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  This is a sample database update process. There should be an SQL
- *  script for each update in this directory. This php file is optionsl
- *  and can be used to perform more complex data updates.
- *
- *  If this file exists, it is called after the matching SQL script has
- *  been run.
- *
- *  ******** THE CODE BELOW IS STICTLY A SAMPLE ********
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 /*
- * Update sample records to build sample_slug field data from title
+ * Update events records to build events_slug field data from title
  */
 
-// Get all sample records
-$sampleRecords = $this->wpdb->get_results('SELECT id, title FROM '.GLM_MEMBERS_SAMPLE_PLUGIN_DB_PREFIX.'samples;', ARRAY_A);
+// Get all events records
+$eventsRecords = $this->wpdb->get_results('SELECT id, title FROM '.GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX.'eventss;', ARRAY_A);
 
-// If there's any sample records
-if ($sampleRecords && count($sampleRecords) > 0) {
+// If there's any events records
+if ($eventsRecords && count($eventsRecords) > 0) {
 
-    // For each sample record
-    foreach ($sampleRecords as $p) {
+    // For each events record
+    foreach ($eventsRecords as $p) {
 
         // Create a slug from the title
         $slug = sanitize_title($p['title']).'-'.$p['id'];
 
         // Store this value back into the record
         $this->wpdb->update(
-                GLM_MEMBERS_SAMPLE_PLUGIN_DB_PREFIX.'samples',
+                GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX.'eventss',
                 array(
-                        'sample_slug' => $slug
+                        'events_slug' => $slug
                 ),
                 array( 'id' => $p['id'] ),
                 array( '%s' ),
index f04d3c3..dbde9c9 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Gaslight Media Members Database
- * GLM Members Sample Add-On Misc Hooks and Filters
+ * GLM Members Events Add-On Misc Hooks and Filters
  *
  * PHP version 5.5
  *
  * @link     http://dev.gaslightmedia.com/
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  This file is used to create hooks into the main plugin or other
- *  add-ons. If no such hooks are needed, this file may be omitted.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 /*
  * Place Misc Hooks and Filters here. If this file exists, it will be included
  * by the add-on main plugin script.
index d768a5e..1e05ae0 100644 (file)
@@ -1,10 +1,10 @@
-<!-- Hooks Help from glm-member-db-sample Add-On -->
+<!-- Hooks Help from glm-member-db-events Add-On -->
 
 
 /**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
+ *  NOTE: THIS IS A EVENTS FILE - DO NOT USE UNMODIFIED
  *
- *  Please change all references to sample, Sample, or SAMPLE to a name
+ *  Please change all references to events, Events, or EVENTS to a name
  *  appropriate for your new Add-On.
  *
  *  This file is used to document hooks provided by this add-on. Content
  **********************************************************************/
 
 
-        <tr><th colspan="3" class="glm-notice"><p>Sample Add-On</p></th></tr>
+        <tr><th colspan="3" class="glm-notice"><p>Events Add-On</p></th></tr>
         
         <tr><th colspan="3">User Permission Hooks</td></tr>
         
         <tr>
-            <td>glm_members_permit_admin_members_sample_tab</td>
+            <td>glm_members_permit_admin_members_events_tab</td>
             <td>Filter</td>
             <td></td>
             <td>
-                Returns boolean answer to "Is current user permitted to see multi-member Sample tab?"
+                Returns boolean answer to "Is current user permitted to see multi-member Events tab?"
             </td>
         </tr>
         <tr>
-            <td>glm_members_permit_admin_members_Sample_add_sample</td>
+            <td>glm_members_permit_admin_members_Events_add_events</td>
             <td>Filter</td>
             <td></td>
             <td>
-                Returns boolean answer to "Is current user permitted to add a new multi-member sample?"
+                Returns boolean answer to "Is current user permitted to add a new multi-member events?"
             </td>
         </tr>
         <tr>
-            <td>glm_members_permit_admin_members_Sample_edit_sample</td>
+            <td>glm_members_permit_admin_members_Events_edit_events</td>
             <td>Filter</td>
             <td></td>
             <td>
-                Returns boolean answer to "Is current user permitted to edit a multi-member sample?"
+                Returns boolean answer to "Is current user permitted to edit a multi-member events?"
             </td>
         </tr>
         <tr>
-            <td>glm_members_permit_admin_member_sample_tab</td>
+            <td>glm_members_permit_admin_member_events_tab</td>
             <td>Filter</td>
             <td></td>
             <td>
-                Returns boolean answer to "Is current user permitted to see the member Sample tab?"
+                Returns boolean answer to "Is current user permitted to see the member Events tab?"
             </td>
         </tr>
         <tr>
-            <td>glm_members_permit_admin_member_Sample_add_sample</td>
+            <td>glm_members_permit_admin_member_Events_add_events</td>
             <td>Filter</td>
             <td></td>
             <td>
-                Returns boolean answer to "Is current user permitted to add a new Member sample?"
+                Returns boolean answer to "Is current user permitted to add a new Member events?"
             </td>
         </tr>
         <tr>
-            <td>glm_members_permit_admin_member_Sample_edit_sample</td>
+            <td>glm_members_permit_admin_member_Events_edit_events</td>
             <td>Filter</td>
             <td></td>
             <td>
-                Returns boolean answer to "Is current user permitted to edit a member sample?"
+                Returns boolean answer to "Is current user permitted to edit a member events?"
             </td>
         </tr>
 
index 8647b12..0600857 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Gaslight Media Members Database
- * GLM Members DB - Sample Add-on - Permissions
+ * GLM Members DB - Events Add-on - Permissions
  *
  * PHP version 5.5
  *
  */
 
 
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  This file is used to add permission checks that can be used throught
- *  the main plugin and add-ons. If no such permissions are needed by
- *  this add-on, this file should be omitted.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 /*
  * Below are permission checks for various specific things in this add-on and
  * elsewhere in the Member DB main plugin and add-ons.
index 06dce0a..a7b2ef8 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Gaslight Media Members Database
- * GLM Members DB - Sample Add-on - Roles & Capabilities
+ * GLM Members DB - Events Add-on - Roles & Capabilities
  *
  * PHP version 5.5
  *
  * @link     http://dev.gaslightmedia.com/
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  This file is used to add roles and capability. If none are required,
- *  this file should be omitted.
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 /**
  * NOTE: This file is only included in the activate.php process.
  *       It is not regularly used during operation.
index bcb28fa..c4c5d79 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Gaslight Media Members Database
- * GLM Members Sample Add-On Short Codes
+ * GLM Members Events Add-On Short Codes
  *
  * PHP version 5.5
  *
  * @link     http://dev.gaslightmedia.com/
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  This file is used to define shortcodes that will be handled by this
- *  add-0n.
- *
- *  DO NOT DELETE THIS FILE EVEN IF THERE ARE NOT SHORTCODES
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 /*
  * Array of short-code
  *
  *      ... additional short-codes
  * )
  *
- * Shortcode descriptions sample
+ * Shortcode descriptions events
  *
  *  <tr>
- *       <th>[glm-members-sample-shortcode]</th>
+ *       <th>[glm-members-events-shortcode]</th>
  *       <td>&nbsp;</td>
  *       <td width="50%">
  *           <p>
  *
  */
 
-$glmMembersSampleShortcodes = array(
+$glmMembersEventsShortcodes = array(
 );
 
-$glmMembersSampleShortcodesDescription = '';
+$glmMembersEventsShortcodesDescription = '';
 
index 658d1d6..c3c218d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Gaslight Media Members Database
- * GLM Members Sample Add-On Valid Actions
+ * GLM Members Events Add-On Valid Actions
  *
  * PHP version 5.5
  *
  * @link     http://dev.gaslightmedia.com/
  */
 
-/**********************************************************************
- *  NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- *  Please change all references to sample, Sample, or SAMPLE to a name
- *  appropriate for your new Add-On.
- *
- *  This file is used to define valid actions for both admin and
- *  front-end pages.
- *
- *  DO NOT DELETE THIS FILE EVEN IF THERE ARE NO ACTIONS
- *
- *  Remove this message before using this file in production!
- **********************************************************************/
-
 /*
  * Array of valid menu items and actions.
  *
  * DB plugin when this plugin registers itself.
  */
 
-$glmMembersSampleAddOnValidActions = array(
+$glmMembersEventsAddOnValidActions = array(
     'adminActions' => array(
         'members' => array(
-            'sample' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
+            'events' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
         ),
-        'sample' => array(
-            'index' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
-            'more' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
+        'events' => array(
+            'index' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+            'more' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
         ),
         'info' => array(
-            'index' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG
+            'index' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
         )
     ),
     'frontActions' => array(
 /*
-        'sample' => array(
-            'list' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
-            'detail' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG
+        'events' => array(
+            'list' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+            'detail' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
         )
 */
     )
 );
 
-?>
\ No newline at end of file
+?>