Last active
August 29, 2015 14:07
-
-
Save zackkatz/b637f4c38c4cddb26cd8 to your computer and use it in GitHub Desktop.
Show all users in the Change Entry Creator dropdown (instead of just 300)
This file contains 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 | |
/* | |
Plugin Name: GravityView - Show All Users in Change Entry Creator | |
Plugin URI: http://gravityview.co | |
Description: Show all users in the Change Entry Creator dropdown (instead of just 300) | |
Version: 1.1 | |
Author: Katz Web Services, Inc. | |
Author URI: http://www.katzwebservices.com | |
Text Domain: gravityview | |
License: GPLv2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
add_filter('gravityview_change_entry_creator_user_parameters', 'modify_gravityview_change_entry_creator_parameters'); | |
/** | |
* Show all users in the Change Entry Creator dropdown (instead of just 300) | |
* | |
* There are issues with too many users where it breaks the select. GravityView tries to keep it at a reasonable number (300), but you might want more. This removes the limit. | |
* | |
* @link text http://codex.wordpress.org/Function_Reference/get_users | |
* @param array $params get_users parameters array | |
* @return array Modified array to show all users | |
*/ | |
function modify_gravityview_change_entry_creator_parameters( $params ) { | |
unset( $params['number'] ); | |
return $params; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment