bp_activity_admin_screen_options

Handle save/update of screen options for the Activity component admin screen.

Description

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

Returns (string)

Option value. False to abandon update.

Parameters (3)

0. $value (string)
Will always be false unless another plugin filters it first.
1. $option (string)
Screen option name.
2. $new_value (string)
Screen option form value.

Usage

  1. if ( !function_exists( 'bp_activity_admin_screen_options' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-admin.php'; 
  3.  
  4. // Will always be false unless another plugin filters it first. 
  5. $value = ''; 
  6.  
  7. // Screen option name. 
  8. $option = ''; 
  9.  
  10. // Screen option form value. 
  11. $new_value = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bp_activity_admin_screen_options($value, $option, $new_value); 
  15.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-admin.php  
  1. function bp_activity_admin_screen_options( $value, $option, $new_value ) { 
  2. if ( 'toplevel_page_bp_activity_per_page' != $option && 'toplevel_page_bp_activity_network_per_page' != $option ) 
  3. return $value; 
  4.  
  5. // Per page. 
  6. $new_value = (int) $new_value; 
  7. if ( $new_value < 1 || $new_value > 999 ) 
  8. return $value; 
  9.  
  10. return $new_value;