bp_activity_admin_screen_options( string $value, string $option, string $new_value )

Handle save/update of screen options for the Activity 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-activity/bp-activity-admin.php

function bp_activity_admin_screen_options( $value, $option, $new_value ) {
	if ( 'toplevel_page_bp_activity_per_page' != $option && 'toplevel_page_bp_activity_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

Changelog
Version Description
BuddyPress 1.6.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.