Created
November 12, 2018 20:23
-
-
Save WPprodigy/7b47a0f6bb73a8f0c5d366002576f2a6 to your computer and use it in GitHub Desktop.
Specify which users should show up in Edit Flow user lists.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Specify which users should show up in Edit Flow user lists. | |
add_filter( 'ef_users_select_form_get_users_args', function( $args ) { | |
unset( $args['who'] ); | |
$args['role__in'] = array( 'administrator', 'editor', 'author' ); | |
return $args; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://github.com/Automattic/Edit-Flow/blob/4724a3c7681273b0276974569ab335d336dc6e0a/common/php/class-module.php#L454-L464 for the filter.