Remove the description
from the user meta value managenav-menuscolumnshidden
:
add_filter( 'manage_nav-menus_columns', 'enable_nav_menu_description_by_default' );
function enable_nav_menu_description_by_default( $columns )
{
$desc_key = 'managenav-menuscolumnshidden';
$hidden = get_user_option( $desc_key );
$user_id = wp_get_current_user()->ID;
if ( ! $hidden )
{
update_user_option(
$user_id,
$desc_key,
array ( 0 => 'link-target', 1 => 'css-classes', 2 => 'xfn' )
);
}
elseif ( FALSE !== ( $key = array_search( 'description', $hidden ) ) )
{
unset( $hidden[ $key ] );
update_user_option( $user_id, $desc_key, $hidden );
}
return $columns;
}
Related Posts:
- How to add a data attribute to a WordPress menu item
- Get the ID of the page a menu item links to?
- Add container to nav_menu sub menu
- Get menu object from theme_location
- Remove Container Element From wp_nav_menu() Markup
- Using wp_get_nav_menu_items() to list children of children pages
- Auto close (hide) custom metabox / set default state
- Breadcrumbs showing Parent and Child Pages
- How to remove a metabox from menu editor page?
- Custom menus displaying all pages instead of set pages
- Return only top-level navigation items from a menu using wp_get_nav_menu_items
- Dynamically add sub-categories to any category in the menu
- Breadcrumb how i can display page title with parent > child title with permalink ? any Idea
- Two different menus for two different locations?
- Displaying Saved Meta Box Data in Drop Down with selected()
- automatically adding submenu items
- Unregister Nav Menu with fallback?
- How to programmatically set a menu to be the Primary Menu?
- radio button is checked but display not check
- Editing or filtering the output of the Genesis navigation
- Make menu structure match page heirarchy on page parent change
- Is there a way to add a class to non current menu item?
- How to hide, and not to remove the attributes metabox?
- Logout hyperlink within a sub-menu
- Menu fallback “menu_class” rendering a “div” instead of a “ul”
- CSS for menu item added via functions.php
- How To Remove Duplicate Menu Locations
- get_post_type() in in_array doesn’t work for some reason
- How to hide a plugin metabox for non admins when a user adds a new post
- Where do I add html code to the menu div?
- Replace menu links with # and add name to its li
- How do I create page navigation linking to each H2 within the page? [closed]
- Function issue with Walker_Nav_Menu [duplicate]
- Custom Static Links For Specific Menu Right Before/Next The wp_nav_menu Function now working
- Make parent page only link to first subpage
- How to add nav menu items to a specific position within a menu
- wp_nav_menu, walker class, categories as classes of li
- Hard-coding custom menu elements for menu manager
- Custom Nav Walker sub-menu
- How to fetch the name of the active menu?
- Custom Attachment Caption Fields
- Replace a menu with widget or a custom template file programmatically
- Categories as main menu items and subcategories as nested lists
- Removing specific menu items?
- How do I hook into the container of wp_nav_menu?
- Adding jQuery datepicker to Custom Post Type Metabox [closed]
- Use a shortcode to display custom meta box contents
- New custom menu created. how to apply it?
- Dropline menus — seperators between children only?
- Filter nav menu items HTML tags and wrap inner text with span
- retrieves menu and converts it to a readable array
- Functions php shortcode for displaying main menu with no child items
- Nav menus all outputting the same links
- Secondary Menu and Logged In Users
- Show some menu sub items as dropdown under a menu item
- How to add custom li item to wordpress menu
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- Default Nav Highlight
- why is this function firing on all child menu items as well?
- Different methods of adding menu support to custom theme
- Adding a section in line at the end of the main navigation menu in php
- Multiple navigation menu in same location
- How to register a menu based on a ACF condition
- How to hightlight all ancestor menu items of a child page NOT displayed in menu
- current_page_item is missing inside wp_nav_menu
- search form leads to 404
- Unable to add extra elements to the main navi (wp_nav_menu_items)
- How Can I add a menu to the theme from withen the function.php file
- define css class in functions.php
- Custom Menu in Admin doesn’t change menu in browser
- How would I make a function to dynamically determine if user is logged to change navigation menu text?
- Conditional custom menu?
- How to change a meta value (of a published post) after X days.?
- sort metabox columns in listing Single
- wp_nav_menu displaying all pages
- How to avoid saving empty data to sql while using add_meta_box
- Save Meta when custom Taxonomy Saves
- How to display an image before title text in menu items
- Render metabox gallery in frontend
- Bizarre Child Menu Issue on WP Site
- Header menu aligned right on all pages except for single-post page [closed]
- How to automatically add counted number to navigation menu items?
- Combine multiple menus using the filter wp_nav_menu_items
- Menu and category highlighting for a single post
- WordPress Toggle Menu has stopped working
- Creating a “Related Meta” type field?
- How to add widget in main menu
- Language Switch Function
- Insert menu into theme location depending on user logged in/out status
- Adding custom field in menu options [duplicate]
- Modify sub_menu function to show pages below a specifically set page
- wp_nav_walker that interacts with widgets to setup mega menu
- Adding a filter with custom function to the menu / navigation
- Meta Box value not been pulled in
- How to add a class name to the ancestor of a post?
- How do I get my nav menu to show sub pages?
- Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ in ….functions.php on line 73
- Decimal stripped from metabox number
- Why don’t ‘wp_nav_menu’ CSS classes work until a menu is created?
- How to add more than one menu for logged in members?