From 001f69d2eaa001bcd4ce15cd6b826c51e7cd2b3d Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Mon, 11 Dec 2017 15:35:31 -0500 Subject: [PATCH] Appearance changes for registration event admin management --- activate.php | 78 ------------------- setup/rolesAndCapabilities.php | 19 ----- views/admin/registrations/eventDashboard.html | 1 - .../registrations/eventEditCustomFields.html | 6 +- .../admin/registrations/eventEditLevels.html | 6 +- 5 files changed, 7 insertions(+), 103 deletions(-) delete mode 100644 setup/rolesAndCapabilities.php diff --git a/activate.php b/activate.php index d7c13dc..5f47457 100644 --- a/activate.php +++ b/activate.php @@ -70,84 +70,6 @@ class glmMembersRegistrationsPluginActivate // Set current plugin version update_option('glmMembersRegistrationsPluginVersion', GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION); - // Set Roles and Capabilities for this plugin - require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_SETUP_PATH.'/rolesAndCapabilities.php'; } - /* - * Add a capability to all current roles - * - * @param string $capability Name of capability to add - * @param array $default Whether capability should be on by default - * array( - * 'author' => false, - * 'contributor' => false, - * 'editor' => false, - * 'subscriber' => false - * ) - * - * @return void - * @access private - */ - private function addRoleCapability($capability, $default) - { - // Get list of role objects - $roleObjects = $GLOBALS['wp_roles']->role_objects; - - // Get list of roles we can edit - $roles = get_editable_roles(); - - // For each role object - foreach ($roleObjects as $key => $role) { - - // Check if the role exists in list of editable roles and - // the capability does not exist - if (isset($roles[$key]) && ! isset($role->capabilities[$capability])) { - - // Check if a default value has been specified in the $default array - $enabled = false; - if (isset($default[$role->name])) { - - // It has, so use that - $enabled = $default[$role->name]; - - } - - // Add the role - $role->add_cap($capability, $enabled); - - } - } - } - - - /* - * Delete a capability from all current roles - * - * @param string $capability Name of capability to add - * - * @return void - * @access private - */ - private function deleteRoleCapability($capability) - { - // Get list of role objects - $roleObjects = $GLOBALS['wp_roles']->role_objects; - - // Get list of roles we can edit - $roles = get_editable_roles(); - - // For each role object - foreach ($roleObjects as $key => $role) { - - if ( isset($role->capabilities[$capability])) { - $role->remove_cap($capability); - } - - } - - } - - - } diff --git a/setup/rolesAndCapabilities.php b/setup/rolesAndCapabilities.php deleted file mode 100644 index 0c0e7ca..0000000 --- a/setup/rolesAndCapabilities.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @license http://www.gaslightmedia.com Gaslightmedia - * @release rolesAndPermissions.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ - * @link http://dev.gaslightmedia.com/ - */ - -/** - * NOTE: This file is only included in the activate.php process. - * It is not regularly used during operation. - */ diff --git a/views/admin/registrations/eventDashboard.html b/views/admin/registrations/eventDashboard.html index c871cec..59290fc 100644 --- a/views/admin/registrations/eventDashboard.html +++ b/views/admin/registrations/eventDashboard.html @@ -107,7 +107,6 @@
- Edit Registration Event {$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $regEvent.event)}
diff --git a/views/admin/registrations/eventEditCustomFields.html b/views/admin/registrations/eventEditCustomFields.html index f5e343a..4794bcf 100644 --- a/views/admin/registrations/eventEditCustomFields.html +++ b/views/admin/registrations/eventEditCustomFields.html @@ -36,7 +36,7 @@


{* Per Event Form for this event *} -

Per submission including this event

+

Requested once when registering for this event

These are additional fields of information that will be requested for this event in each submission.

{assign var="eventFid" value="glm_reg_customfields_reg_event_`$regEventID`"} @@ -45,7 +45,7 @@ {* Per Attendee Form for this event *}


-

Each attendee for this event

+

Requested for each attendee for this event

These are additional fields of information that will be requested for each registrant for this event.

{assign var="attendeeFid" value="glm_reg_customfields_reg_attendee_`$regEventID`"} @@ -55,7 +55,7 @@ {* Per Attendee form for each class (level) for this event *}


{foreach $classes as $class} -

Each attendee for level: {$class.name}

+

Requested for each attendee for level: {$class.name}

These are additional fields of information that will be requested for each registrant for this event.

{assign var="levelFid" value="glm_reg_customfields_reg_event_`$regEventID`_level_`$class.id`"} diff --git a/views/admin/registrations/eventEditLevels.html b/views/admin/registrations/eventEditLevels.html index de6f2e1..b0ca41b 100644 --- a/views/admin/registrations/eventEditLevels.html +++ b/views/admin/registrations/eventEditLevels.html @@ -46,7 +46,8 @@