bp_groups_admin_screen_options( string $value, string $option, string $new_value )
Handle save/update of screen options for the Groups component admin screen.
Description
Parameters
- $value
-
(Required) Will always be false unless another plugin filters it first.
- $option
-
(Required) Screen option name.
- $new_value
-
(Required) Screen option form value.
Return
(string|int) Option value. False to abandon update.
Source
File: bp-groups/bp-groups-admin.php
function bp_groups_admin_screen_options( $value, $option, $new_value ) {
if ( 'toplevel_page_bp_groups_per_page' != $option && 'toplevel_page_bp_groups_network_per_page' != $option )
return $value;
// Per page.
$new_value = (int) $new_value;
if ( $new_value < 1 || $new_value > 999 )
return $value;
return $new_value;
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.7.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.