WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/18/2010 06:53:47 PM (9 years ago)
Author:
ryan
Message:

Allow flagging of a blog as mature via a URL. Move some actions into update_blog_status(). Props Viper007Bond. fixes #14385

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-blogs.php

    r15756 r15836  
    629629        refresh_blog_details($blog_id);
    630630
    631     if ( $pref == 'spam' ) {
    632         if ( $value == 1 )
    633             do_action( "make_spam_blog", $blog_id );
    634         else
    635             do_action( "make_ham_blog", $blog_id );
    636     }
     631    if ( 'spam' == $pref )
     632        ( $value == 1 ) ? do_action( 'make_spam_blog', $blog_id ) : do_action( 'make_ham_blog', $blog_id );
     633    elseif ( 'mature' == $pref )
     634        ( $value == 1 ) ? do_action( 'mature_blog', $blog_id ) : do_action( 'unmature_blog', $blog_id );
     635    elseif ( 'archived' == $pref )
     636        ( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );
     637    elseif ( 'archived' == $pref )
     638        ( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );
    637639
    638640    return $value;
Note: See TracChangeset for help on using the changeset viewer.