Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: make_ham_blog

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
250           $update_details[$field] = $details[$field];
251
252      $wpdb->update( $wpdb->blogs, $update_details, array('blog_id' => $blog_id) );
253
254      // If spam status changed, issue actions.
255      if ( $details[ 'spam' ] != $current_details[ 'spam' ] ) {
256           if ( $details[ 'spam' ] == 1 )
257                do_action( "make_spam_blog", $blog_id );
258           else
259                do_action( "make_ham_blog", $blog_id );
260      }
261
262      if ( isset($details[ 'public' ]) )
263           update_blog_option( $blog_id, 'blog_public', $details[ 'public' ], false );
264
265      refresh_blog_details($blog_id);
266
267      return true;
268 }
 
Line Code
512      $wpdb->update( $wpdb->blogs, array($pref => $value, 'last_updated' => current_time('mysql', true)), array('blog_id' => $blog_id) );
513
514      if ( $refresh )
515           refresh_blog_details($blog_id);
516
517      if ( $pref == 'spam' ) {
518           if ( $value == 1 )
519                do_action( "make_spam_blog", $blog_id );
520           else
521                do_action( "make_ham_blog", $blog_id );
522      }
523
524      return $value;
525 }
526
527 function get_blog_status( $id, $pref ) {
528      global $wpdb;
529
530      $details = get_blog_details( $id, false );