// 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);
- }
-
- }
-
- }
-
-
-
}
+++ /dev/null
-<?php
-/**
- * Gaslight Media Event Registrations
- * Roles & Capabilities
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package glmMembersRegistrations
- * @author Chuck Scott <cscott@gaslightmedia.com>
- * @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.
- */
<div class="glm-admin-table">
<div class="glm-row">
<div class="glm-small-12 glm-column">
- <a href="{$thisUrl}?page=glm-members-admin-menu-registrations-events&option=edit®EventID={$regEvent.id}" class="button button-secondary glm-button">Edit Registration Event</a>
{$r_link = apply_filters('glm_members_add_link_to_registrations_event_list_entry', $regEvent.event)}
</div>
</div>
<p><hr></p>
{* Per Event Form for this event *}
- <h3>Per submission including this event</h3>
+ <h3>Requested once when registering for this event</h3>
<p>These are additional fields of information that will be requested for this event in each submission.</p>
<p>
{assign var="eventFid" value="glm_reg_customfields_reg_event_`$regEventID`"}
{* Per Attendee Form for this event *}
<p><hr></p>
- <h3>Each attendee for this event</h3>
+ <h3>Requested for each attendee for this event</h3>
<p>These are additional fields of information that will be requested for each registrant for this event.</p>
<p>
{assign var="attendeeFid" value="glm_reg_customfields_reg_attendee_`$regEventID`"}
{* Per Attendee form for each class (level) for this event *}
<p><hr></p>
{foreach $classes as $class}
- <h3>Each attendee for level: {$class.name}</h3>
+ <h3>Requested for each attendee for level: {$class.name}</h3>
<p>These are additional fields of information that will be requested for each registrant for this event.</p>
<p>
{assign var="levelFid" value="glm_reg_customfields_reg_event_`$regEventID`_level_`$class.id`"}
</script>
<script type="text/template" id="regClass-template">
- <div class="class-display-template" style="">
+<div style="background-color: white; padding: .25rem; border: 1px solid black;">
+ <div class="class-display-template">
<div class="glm-class-header">
<div class="glm-right">
<a class="class-edit button button-secondary glm-button-small">Edit</a>
</div>
<div class="class-rate-container">
</div>
+</div>
</script>
<script type="text/template" id="regRate-template">
</div>
</div>
</div>
- <div class="rate-edit-template" style="display: none; border: 1px solid black; padding: 1em; margin: 1em;">
+ <div class="rate-edit-template" style="display: none; border: 1px solid black; padding: 1em; background-color: #f8ffff;">
<div class="glm-rate-header">
<div class="glm-right">
<a class="rate-update button glm-button-small-highlighted">Update</a>