• Resolved Nick Forest

    (@nickshor)


    // Adds the following PAGE statuses to the "PAGES" administration submenu
    add_action('admin_menu', 'cms_page_status_menu',3);
    function cms_page_status_menu() {
    
    	global $submenu;
    	$cms_page_status_items = array(
    		array( __('Drafts'), 'read' , get_admin_url() . 'edit.php?post_status=draft&post_type=page' ),
    		array( __('Pending'), 'read' , get_admin_url() . 'edit.php?post_status=pending&post_type=page' ),
    		array( __('Scheduled'), 'read' , get_admin_url() . 'edit.php?post_status=future&post_type=page' ),
    		array( __('Published'), 'read' , get_admin_url() . 'edit.php?post_status=publish&post_type=page' )
    	);
    
    	foreach( $cms_page_status_items as $item ) {
    		array_push( $submenu['edit.php?post_type=page'], $item );
    	}
    }

    Maybe someone will add a little CSS code to help distinguish statuses by color ??

    https://www.ads-software.com/extend/plugins/post-status-menu-items/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author mrwweb

    (@mrwweb)

    @nicusor, that’s a great idea! That will certainly get into the next release when I have a moment. Any color preferences?

    Plugin Author mrwweb

    (@mrwweb)

    BTW, page statuses will be in the next version, but I lean toward disabling them by default and providing the option to enable them (with some new options added to the “Writing” settings.

    Thoughts?

    Thread Starter Nick Forest

    (@nickshor)

    Good idea to make an option to enable them, not everybody will want that for pages if they only have couple of them.

    But if I have many pages I want somehow to easily distinguish by parent/child and by statuses (I think of lite configurable colors) => /wp-admin/edit.php?post_type=page.

    This plugin has a nice Admin Collapse Subpages, but also no other way easily to distinguish the pages by status…

    Plugin Author mrwweb

    (@mrwweb)

    Just an FYI, in case you didn’t see it. I made a big update to support all post types (including custom post types with show_ui = true).

    Hope that helps ??

    Hey does anyone know how make pages only published and draft and get rid of all the other statuses

    Plugin Author mrwweb

    (@mrwweb)

    Hi @thefreeworld.

    I went back to look at the plugin to think if there’s an easy way for you to do this. The answer is not really.

    For right now, you might be able to look at the code or the snippet that inspired the plugin and write your own miniature version of the plugin only for posts.

    However, moving forward, when I next update this plugin (which isn’t planned although you’re giving me a good reason to consider it), I should build in some filters for people to customize the post statuses that appear in the menus.

    Hope that helps.

    p.s. This thread should have been marked “Resolved” already, but try to open up a new thread for new support issues rather than piggy-backing on a similar-but-not-the-same thread. Plugin authors will thank you ??

    Plugin Author mrwweb

    (@mrwweb)

    @thefreeworld: Make sure to check out the new version of the plugin (v1.1.0). It now includes the option to exclude any post statuses you don’t want.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Post Status Menu Items] Page Status Menu Items’ is closed to new replies.