}
- if (get_option(GLM_MEMBERS_PLUGIN_OPTION_FIRST_ACTIVATION, 'none') == 'none') {
- update_option(GLM_MEMBERS_PLUGIN_OPTION_FIRST_ACTIVATION, true);
+ if (get_option(GLM_MEMBERS_PLUGIN_OPTION_FIRST_ACTIVATION, 'None') == 'None') {
+ update_option(GLM_MEMBERS_PLUGIN_OPTION_FIRST_ACTIVATION, 'true');
} else {
- update_option(GLM_MEMBERS_PLUGIN_OPTION_FIRST_ACTIVATION, false);
+ update_option(GLM_MEMBERS_PLUGIN_OPTION_FIRST_ACTIVATION, 'false');
}
}
// is checked by translating the page title.
$newSlug = sanitize_title($requiredPageInfo['title']);
$existingSlug = $this->verify_post_slug($newSlug);
- if ($newSlug == $existingSlug) {
- $existingID = $this->get_post_id_by_slug($newSlug);
- update_option($option, $existingID);
+
+ // But only run this if it is the first time this plugin is activated
+ if (get_option(GLM_MEMBERS_PLUGIN_OPTION_FIRST_ACTIVATION) == 'true') {
+ if ($newSlug == $existingSlug) {
+ $existingID = $this->get_post_id_by_slug($newSlug);
+ update_option($option, $existingID);
+ }
}
+
$existingPost = get_post(get_option($option));
// If a post with the ID set in the option does not exist
if ( !$existingPost) {
// No page created
}
}
-
+ if (get_option(GLM_MEMBERS_PLUGIN_OPTION_FIRST_ACTIVATION) == 'true') {
+ update_option(GLM_MEMBERS_PLUGIN_OPTION_FIRST_ACTIVATION, 'false');
+ }
}
public function insertReqPage($pTitle = '--bad page--', $pContent = '', $pPublish = 'publish', $pType = 'page', $pAuthor = '1', $pTemplate = 'index.php', $pParent = '0')
font-size: 24px;
line-height: 1;
}
+.glm-member-list-image-border img {
+ float: right;
+}
.glm-member-db-list-grid-view .glm-member-title {
font-size: 24px;
font-weight: normal;
overflow: hidden;
position: absolute;
top: 13px;
- width: 100px;
+ width: 120px;
}
#glm-member-detail-takeback-mini:hover {
text-decoration: none;
- width: 170px;
+ width: 190px;
-webkit-transition: width 0.5s ease;
-moz-transition: width 0.5s ease;
-o-transition: width 0.5s ease;
$glmMembersShortcodesDescription = '
<!-- glm-members-list -->
-
+<table id="glm-table-shortcodes-members" class="glm-admin-table glm-shortcodes-table">
+ <tr><th>Shortcode</th><th>Attribute</th><th>Description</th></tr>
<tr>
<th>[glm-members-list]</th>
<td> </td>
</p>
</td>
</tr>
-
+ </table>
';
<p><pre>[glm-members-list category="11"]</pre></p>
<p> </p>
-
- <table class="glm-admin-table">
- <tr><th>Shortcode</th><th>Attribute</th><th>Description</th></tr>
-
+
+ <h2 class="nav-tab-wrapper" style="margin-bottom: 1em;">
+ <a id="glm-shortcodes-members" data-show-table="glm-table-shortcodes-members" class="glm-shortcodes-tab nav-tab nav-tab-active">Members</a>
+ <a id="glm-shortcodes-packaging" data-show-table="glm-table-shortcodes-packaging" class="glm-shortcodes-tab nav-tab">Packaging</a>
+ <a id="glm-shortcodes-events" data-show-table="glm-table-shortcodes-events" class="glm-shortcodes-tab nav-tab">Events</a>
+<!-- <a id="glm-shortcodes-contacts" data-show-table="glm-table-shortcodes-contacts" class="glm-shortcodes-tab nav-tab">Contacts</a>-->
+<!-- <a id="glm-shortcodes-socials" data-show-table="glm-table-shortcodes-socials" class="glm-shortcodes-tab nav-tab">Socials</a>-->
+ </h2>
+
{$shortcodesDescription}
- </table>
-
+ <script>
+ jQuery(document).ready(function($) {
+
+ /*
+ * Edit area tabs
+ */
+ $('.glm-shortcodes-tab').click( function() {
+
+ // Clear tabl highlights and hide all tables
+ $('.glm-shortcodes-tab').removeClass('nav-tab-active');
+ $('.glm-shortcodes-table').addClass('glm-hidden');
+
+ // Highlight selected tab
+ $(this).addClass('nav-tab-active');
+
+ // Show selected table
+ var table = $(this).attr('data-show-table');
+ $('#' + table).removeClass('glm-hidden');
+
+
+ });
+ })
+ </script>
{include file='admin/footer.html'}