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
278
279      if ( false === $result )
280           return false;
281
282      // If spam status changed, issue actions.
283      if ( $details[ 'spam' ] != $current_details[ 'spam' ] ) {
284           if ( $details[ 'spam' ] == 1 )
285                do_action( 'make_spam_blog', $blog_id );
286           else
287                do_action( 'make_ham_blog', $blog_id );
288      }
289
290      // If mature status changed, issue actions.
291      if ( $details[ 'mature' ] != $current_details[ 'mature' ] ) {
292           if ( $details[ 'mature' ] == 1 )
293                do_action( 'mature_blog', $blog_id );
294           else
295                do_action( 'unmature_blog', $blog_id );
296      }
 
Line Code
656
657      $result = $wpdb->update( $wpdb->blogs, array($pref => $value, 'last_updated' => current_time('mysql', true)), array('blog_id' => $blog_id) );
658
659      if ( false === $result )
660           return false;
661
662      refresh_blog_details( $blog_id );
663
664      if ( 'spam' == $pref )
665           ( $value == 1 ) ? do_action( 'make_spam_blog', $blog_id ) :     do_action( 'make_ham_blog', $blog_id );
666      elseif ( 'mature' == $pref )
667           ( $value == 1 ) ? do_action( 'mature_blog', $blog_id ) : do_action( 'unmature_blog', $blog_id );
668      elseif ( 'archived' == $pref )
669           ( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );
670      elseif ( 'deleted' == $pref )
671           ( $value == 1 ) ? do_action( 'make_delete_blog', $blog_id ) : do_action( 'make_undelete_blog', $blog_id );
672      elseif ( 'public' == $pref )
673           do_action( 'update_blog_public', $blog_id, $value ); // Moved here from update_blog_public().
674