Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
* Multiple content sections not working.
  • Loading branch information
joelworsham committed Aug 18, 2014
1 parent dceb51c commit 587808c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Using this plugin is very simple. All you have to do is:

## Changelog

### [1.5.3](https://github.com/brashrebel/client-dash/releases/tag/v1.5.3)
* Multiple content sections not working.

### [1.5.2](https://github.com/brashrebel/client-dash/releases/tag/v1.5.2)
* Postboxes being half width was targeting all pages, when it should have only been targeting the dashboard.

Expand Down
4 changes: 2 additions & 2 deletions client-dash.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
Plugin Name: Client Dash
Description: Creating a more intuitive admin interface for clients.
Version: 1.5.2
Version: 1.5.3
Author: Kyle Maurer
Author URI: http://realbigmarketing.com/staff/kyle
*/
Expand All @@ -29,7 +29,7 @@ class ClientDash extends ClientDash_Functions {
*
* @since Client Dash 1.5
*/
public $version = '1.5';
public $version = '1.5.3';

/**
* A list of all tab files to include.
Expand Down
31 changes: 13 additions & 18 deletions core/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,27 +173,22 @@ public function add_content_section( $content_section ) {
// Fix up the page name (to allow spaces and such)
$page = $this->translate_name_to_id( $content_section['page'] );

$ClientDash->content_sections[ $page ][ $tab_ID ] = array(
'name' => $content_section['tab'],
'content-sections' => array(
$ID => array(
'name' => $content_section['name'],
'callback' => $content_section['callback'],
'priority' => $content_section['priority']
)
)
// Add to the array
$ClientDash->content_sections[ $page ][ $tab_ID ]['name'] = $content_section['tab'];

$ClientDash->content_sections[ $page ][ $tab_ID ]['content-sections'][ $ID ] = array(
'name' => $content_section['name'],
'callback' => $content_section['callback'],
'priority' => $content_section['priority']
);

// Also add for the unmodified version
$ClientDash->content_sections_unmodified[ $page ][ $tab_ID ] = array(
'name' => $content_section['tab'],
'content-sections' => array(
$ID => array(
'name' => $content_section['name'],
'callback' => $content_section['callback'],
'priority' => $content_section['priority']
)
)
$ClientDash->content_sections_unmodified[ $page ][ $tab_ID ]['name'] = $content_section['tab'];

$ClientDash->content_sections_unmodified[ $page ][ $tab_ID ]['content-sections'][ $ID ] = array(
'name' => $content_section['name'],
'callback' => $content_section['callback'],
'priority' => $content_section['priority']
);
}

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: BrashRebel, joelworsham
Tags: client, portal, dashboard, admin, users, webmaster
Requires at least: 3.8.0
Tested up to: 3.9.2
Stable tag: 1.5.2
Stable tag: 1.5.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -47,6 +47,9 @@ Using this plugin is very simple. All you have to do is:

== Changelog ==

= 1.5.3 =
* Multiple content sections not working.

= 1.5.2 =
* Postboxes being half width was targeting all pages, when it should have only been targeting the dashboard.

Expand Down

0 comments on commit 587808c

Please sign in to comment.