Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zackkatz/b637f4c38c4cddb26cd8 to your computer and use it in GitHub Desktop.
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)
<?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