bp_blogs_update_option_close_comments_days_old

Update "Close comments after days old" option in BuddyPress blogmeta table.

Description

bp_blogs_update_option_close_comments_days_old( (string) $oldvalue, (string) $newvalue ); 

Parameters (2)

0. $oldvalue (string)
Value before save. Passed by do_action() but unused here.
1. $newvalue (string)
Value to change meta to.

Usage

  1. if ( !function_exists( 'bp_blogs_update_option_close_comments_days_old' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-blogs/bp-blogs-functions.php'; 
  3.  
  4. // Value before save. Passed by do_action() but 
  5. // unused here. 
  6. $oldvalue = ''; 
  7.  
  8. // Value to change meta to. 
  9. $newvalue = ''; 
  10.  
  11. // NOTICE! Understand what this does before running. 
  12. $result = bp_blogs_update_option_close_comments_days_old($oldvalue, $newvalue); 
  13.  

Defined (1)

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

/bp-blogs/bp-blogs-functions.php  
  1. function bp_blogs_update_option_close_comments_days_old( $oldvalue, $newvalue ) { 
  2. global $wpdb; 
  3.  
  4. bp_blogs_update_blogmeta( $wpdb->blogid, 'close_comments_days_old', $newvalue );