From 5a0978e88acc11675f925e590ff93de54afa7292 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 15 Feb 2016 11:22:45 -0500 Subject: [PATCH] Replacing all sample text with events --- classes/data/dataSample.php | 23 +++-------- models/admin/members/sample.php | 6 +-- models/admin/sample/index.php | 6 +-- models/admin/sample/more.php | 6 +-- setup/adminHooks.php | 12 ------ setup/adminTabs.php | 19 ++-------- .../SAMPLE.create_database_V0.0.1.sql | 22 +++++------ setup/databaseScripts/SAMPLE.dbVersions.php | 24 +----------- .../SAMPLE.update_database_V0.0.2.php | 38 +++++-------------- setup/frontHooks.php | 14 +------ setup/hooksHelp.html | 32 ++++++++-------- setup/permissions.php | 15 +------- setup/rolesAndCapabilities.php | 14 +------ setup/shortcodes.php | 24 +++--------- setup/validActions.php | 36 ++++++------------ 15 files changed, 76 insertions(+), 215 deletions(-) diff --git a/classes/data/dataSample.php b/classes/data/dataSample.php index 052a759..648e2d6 100644 --- a/classes/data/dataSample.php +++ b/classes/data/dataSample.php @@ -1,7 +1,7 @@ * @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 +?> diff --git a/models/admin/members/sample.php b/models/admin/members/sample.php index ed2fac9..9f69514 100644 --- a/models/admin/members/sample.php +++ b/models/admin/members/sample.php @@ -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 ); diff --git a/models/admin/sample/index.php b/models/admin/sample/index.php index 5c321df..5c43a53 100644 --- a/models/admin/sample/index.php +++ b/models/admin/sample/index.php @@ -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 ); diff --git a/models/admin/sample/more.php b/models/admin/sample/more.php index b814759..07de2ea 100644 --- a/models/admin/sample/more.php +++ b/models/admin/sample/more.php @@ -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!
This is the Sample Add-On "sample" model with action "more" talking to you from inside WordPress.'; + $displayData = 'Welcome to more information!
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 ); diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 8c36dfc..6e7ad8e 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -13,18 +13,6 @@ * @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. diff --git a/setup/adminTabs.php b/setup/adminTabs.php index 9f22164..e3cb1a7 100644 --- a/setup/adminTabs.php +++ b/setup/adminTabs.php @@ -1,7 +1,7 @@ 'Sample', + 'text' => 'Events', 'menu' => 'members', - 'action' => 'sample' + 'action' => 'events' ) ); $addOnTabs = array_merge($addOnTabs, $newTabs); diff --git a/setup/databaseScripts/SAMPLE.create_database_V0.0.1.sql b/setup/databaseScripts/SAMPLE.create_database_V0.0.1.sql index ae98344..2671913 100644 --- a/setup/databaseScripts/SAMPLE.create_database_V0.0.1.sql +++ b/setup/databaseScripts/SAMPLE.create_database_V0.0.1.sql @@ -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, @@ -13,30 +13,30 @@ -- ********************************************************************** --- 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' ) ; diff --git a/setup/databaseScripts/SAMPLE.dbVersions.php b/setup/databaseScripts/SAMPLE.dbVersions.php index c2b6a9f..5e76b0e 100644 --- a/setup/databaseScripts/SAMPLE.dbVersions.php +++ b/setup/databaseScripts/SAMPLE.dbVersions.php @@ -1,7 +1,7 @@ array('version' => '0.0.1', 'tables' => 2), '0.0.2' => array('version' => '0.0.2', 'tables' => 3) ); diff --git a/setup/databaseScripts/SAMPLE.update_database_V0.0.2.php b/setup/databaseScripts/SAMPLE.update_database_V0.0.2.php index c4ac161..a07182c 100644 --- a/setup/databaseScripts/SAMPLE.update_database_V0.0.2.php +++ b/setup/databaseScripts/SAMPLE.update_database_V0.0.2.php @@ -1,49 +1,31 @@ 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' ), diff --git a/setup/frontHooks.php b/setup/frontHooks.php index f04d3c3..dbde9c9 100644 --- a/setup/frontHooks.php +++ b/setup/frontHooks.php @@ -1,7 +1,7 @@ + /********************************************************************** - * 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 @@ -15,56 +15,56 @@ **********************************************************************/ -

Sample Add-On

+

Events Add-On

User Permission Hooks - glm_members_permit_admin_members_sample_tab + glm_members_permit_admin_members_events_tab Filter - 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?" - glm_members_permit_admin_members_Sample_add_sample + glm_members_permit_admin_members_Events_add_events Filter - 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?" - glm_members_permit_admin_members_Sample_edit_sample + glm_members_permit_admin_members_Events_edit_events Filter - 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?" - glm_members_permit_admin_member_sample_tab + glm_members_permit_admin_member_events_tab Filter - 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?" - glm_members_permit_admin_member_Sample_add_sample + glm_members_permit_admin_member_Events_add_events Filter - 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?" - glm_members_permit_admin_member_Sample_edit_sample + glm_members_permit_admin_member_Events_edit_events Filter - 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?" diff --git a/setup/permissions.php b/setup/permissions.php index 8647b12..0600857 100644 --- a/setup/permissions.php +++ b/setup/permissions.php @@ -1,7 +1,7 @@ - * [glm-members-sample-shortcode] + * [glm-members-events-shortcode] *   * *

@@ -106,8 +92,8 @@ * */ -$glmMembersSampleShortcodes = array( +$glmMembersEventsShortcodes = array( ); -$glmMembersSampleShortcodesDescription = ''; +$glmMembersEventsShortcodesDescription = ''; diff --git a/setup/validActions.php b/setup/validActions.php index 658d1d6..c3c218d 100644 --- a/setup/validActions.php +++ b/setup/validActions.php @@ -1,7 +1,7 @@ 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 +?> -- 2.17.1