bp_blogs_update_option_thread_comments_depth

When updating comment depth, update thread depth in blogmeta table.

Description

bp_blogs_update_option_thread_comments_depth( (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_thread_comments_depth' ) ) { 
  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_thread_comments_depth($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_thread_comments_depth( $oldvalue, $newvalue ) { 
  2. global $wpdb; 
  3.  
  4. $comments_enabled = get_option( 'thread_comments' ); 
  5.  
  6. if ( $comments_enabled ) { 
  7. bp_blogs_update_blogmeta( $wpdb->blogid, 'thread_comments_depth', $newvalue );