Skip to content

Commit

Permalink
Preventing admin menu page names from being pluralized twice
Browse files Browse the repository at this point in the history
  • Loading branch information
tombenner committed Mar 2, 2012
1 parent 6d0ee5e commit d48bcdf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/loaders/mvc_admin_loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function add_menu_pages() {

if (!$hide_menu) {

$controller_pluralize_titleized = MvcInflector::pluralize_titleize($controller_name);
$controller_titleized = MvcInflector::titleize($controller_name);

$admin_controller_name = 'admin_'.$controller_name;

Expand All @@ -87,8 +87,8 @@ public function add_menu_pages() {
$method = $admin_controller_name.'_index';
$this->dispatcher->{$method} = create_function('', 'MvcDispatcher::dispatch(array("controller" => "'.$admin_controller_name.'", "action" => "index"));');
add_menu_page(
$controller_pluralize_titleized,
$controller_pluralize_titleized,
$controller_titleized,
$controller_titleized,
'administrator',
$top_level_handle,
array($this->dispatcher, $method),
Expand All @@ -110,7 +110,7 @@ public function add_menu_pages() {
if ($admin_page['in_menu']) {
add_submenu_page(
$parent_slug,
$admin_page['label'].' ‹ '.$controller_pluralize_titleized,
$admin_page['label'].' ‹ '.$controller_titleized,
$admin_page['label'],
$admin_page['capability'],
$page_handle,
Expand Down

0 comments on commit d48bcdf

Please sign in to comment.