Filter – Re-Order interface capability

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


This filter can be used to change the required capability to show the re-order interface. This is helpfully when using a multisite environment, it will allow to change that in a single line code.
For more help regarding users capabilities can be found at http://codex.wordpress.org/Roles_and_Capabilities

Filter name: apto_reorder_capability

Examples

The following code will change the required capability to edit_posts which means a Contributor will be able to se and use the re-order interface.

add_filter('apto_reorder_capability', 'theme_apto_reorder_capability', 10);
function theme_apto_reorder_capability($capability)
        {
            return 'edit_posts';
        }

Using this filter, the re-order interface can be show for certain users:

add_filter('apto_reorder_capability', 'theme_apto_reorder_capability', 10);
function theme_apto_reorder_capability($capability)
        {
		global $userdata;            
		
		if($userdata->ID == 10)
			return 'edit_posts';
			else
			return $capability;
        }

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

API Index