Created
March 12, 2017 13:34
-
-
Save nickdavis/fa9a3d20efcc1b976c635d3de981dfbe to your computer and use it in GitHub Desktop.
Allow subscribers to be set as authors in WordPress
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 | |
| add_filter( 'wp_dropdown_users_args', 'add_subscribers_to_dropdown', 10, 2 ); | |
| /** | |
| * Allow subscribers to be set as authors | |
| * | |
| * @link http://wordpress.stackexchange.com/a/216117 | |
| * | |
| * @since 1.0.0 | |
| * | |
| * @param $query_args | |
| * @param $r | |
| * | |
| * @return mixed | |
| */ | |
| function add_subscribers_to_dropdown( $query_args, $r ) { | |
| $query_args['who'] = ''; | |
| return $query_args; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment