apply_filters( 'custom_menu_order', bool $custom )

Filters whether to enable custom ordering of the administration menu.


Description Description

See the ‘menu_order’ filter for reordering menu items.


Top ↑

Parameters Parameters

$custom

(bool) Whether custom ordering is enabled. Default false.


Top ↑

Source Source

File: wp-admin/includes/menu.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
2.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by stevenlinx

    Example migrated from Codex:

    The following code below groups Dashboard/Posts/Pages/Comments together at the top of the dashboard menu.

    If you have a custom post type that you want to add to the group, use the format edit.php?post_type=YOURPOSTTYPENAME

    add_filter( 'custom_menu_order', '__return_true' );
    
    add_filter( 'menu_order', 'my_menu_order' );
    
    function my_menu_order( $menu_order ) {
           return array( 'index.php', 'edit.php', 'edit.php?post_type=page', 'edit-comments.php' );
    }
    

Top ↑

You must log in before being able to contribute a note or feedback.