Skip to content

Commit

Permalink
Refactor the gutenberg_fix_navigation_items_admin_menu_entry function.
Browse files Browse the repository at this point in the history
The new name better describes the purpose of the function.
  • Loading branch information
anton-vlasenko committed Nov 4, 2021
1 parent 14a08e8 commit baccf37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ function gutenberg_enable_content_editor_for_navigation_post_type( $post ) {
add_action( 'edit_form_after_editor', 'gutenberg_enable_content_editor_for_navigation_post_type', 10, 1 );

/**
* Fixes the label of the 'wp_navigation' admin menu entry.
* Rename the menu title from "All Navigation Menus" to "Navigation Menus".
*/
function gutenberg_fix_navigation_items_admin_menu_entry() {
function gutenberg_rename_navigation_menus_admin_menu_entry() {
global $submenu;
if ( ! isset( $submenu['themes.php'] ) ) {
return;
Expand All @@ -511,4 +511,4 @@ function gutenberg_fix_navigation_items_admin_menu_entry() {
}
}

add_action( 'admin_menu', 'gutenberg_fix_navigation_items_admin_menu_entry' );
add_action( 'admin_menu', 'gutenberg_rename_navigation_menus_admin_menu_entry' );

0 comments on commit baccf37

Please sign in to comment.