Filter – Admin – Hide Re-Order submenu item

Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInPrint this page


This filter can be used to force hide /show the re-order interface, independently from the internal (admin) settings.

apto/admin/reorder-interface/hide

Examples

The following code will always hide the interface if the post type is “post” and the user id is 1

add_filter('apto/admin/reorder-interface/hide', 'apto_admin_reorder_interface_hide', 10, 2);
function apto_admin_reorder_interface_hide($hide_reorder_interface, $location_menu_data)
        {
            global $userdata;
            
	    if($location_menu_data['post_type']    ==  "post"  && $userdata->ID == 1 )
                $hide_reorder_interface =   FALSE;
                    
            return $hide_reorder_interface;	
        }

*This code should be used within the theme or a custom plugin.

API Index


Subscribe
Notify of
guest
6 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
seltzer

Hi,

yesterday I bought the single license of ‘Advanced Post Types Order’ plugin.

The plugin is very good, but i have a problem.

I have a lot of posts (16.000) and the page ‘re-order’ fails to load.

How can I limit the display of only last 100 posts in that page?

Sorry for my english.

nspcode

Hi,
Starting version 3.7 you can use the pagination functionality.

Thanks

Steve Pfisterer

This filter doesn’t work. ‘apto_restrict_reorder_interface’ isn’t found anywhere in the code base.

nspcode

Sorry, this was deprecated some time ago, here’s the new filter to be used instead apto/admin/reorder-interface/hide https://www.nsp-code.com/advanced-post-types-order-api/filter-admin-hide-re-order-submenu-item/

Steve Pfisterer

Thanks for replying! I still don’t see this filter in the codebase anywhere for version 3.7. The only similar filters I see when I search the codebase are “apto/wp-admin/reorder-interface/sort-view-required-capability” and “apto/wp-admin/reorder-interface/filter-area-html”

nspcode

Actually the filter is available starting version 3.7.1, so please use the download link to get the latest files.