PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / trunk
Search Atlas SEO – OTTO AI SEO Automation for WordPress vtrunk
2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 2.6.4 2.6.3 All 139 releases
← All changes | includes/class-metasync-access-control.php +6 -1 2.6.10 → trunk View file →
@@ -227,12 +227,17 @@
227 227 * @param array $args Optional arguments for get_users
228 228 * @return array Array of user objects
229 229 */
230 230 public static function get_users($args = array()) {
231 + // Filter at the query level instead of slicing an arbitrary first
232 + // 100 users: on sites with more users than that, administrators past
233 + // the cap silently disappeared from the per-user access dropdown.
234 + // The capability argument needs WP 5.9+; the user_can() loop below
235 + // still covers older versions.
231 236 $default_args = array(
232 237 'orderby' => 'display_name',
233 238 'order' => 'ASC',
234 - 'number' => 100 // Limit to prevent performance issues
239 + 'capability' => 'manage_options',
235 240 );
236 241
237 242 $args = wp_parse_args($args, $default_args);
238 243 $all_users = get_users($args);