bp_blogs_blog_id_before_save

Filters the blog blog ID before save.

Description

apply_filters( 'bp_blogs_blog_id_before_save', (int) $this_blog_id, (int) $this_id ); 

Parameters (2)

0. $this_blog_id (int)
The this blog id.
1. $this_id (int)
The this id.

Usage

To run the hook, copy the example below.
  1. $this_blog_id = apply_filters( 'bp_blogs_blog_id_before_save', $this_blog_id, $this_id ); 
  2.  
  3. if ( !empty( $this_blog_id ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_blogs_blog_id_before_save callback 
  2. function filter_bp_blogs_blog_id_before_save( $this_blog_id, $this_id ) { 
  3. // make filter magic happen here... 
  4. return $this_blog_id
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_blogs_blog_id_before_save', 'filter_bp_blogs_blog_id_before_save', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_blogs_blog_id_before_save', 'filter_bp_blogs_blog_id_before_save', 10, 2 ); 

Defined (1)

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

/bp-blogs/classes/class-bp-blogs-blog.php  
  1. $this->blog_id = apply_filters( 'bp_blogs_blog_id_before_save', $this->blog_id, $this->id );