Skip to:
Content

BuddyPress.org

Changeset 3031


Ignore:
Timestamp:
06/10/2010 07:34:27 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2003, #2415

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-blogs.php

    r3018 r3031  
    356356}
    357357add_action( 'wpmu_new_blog', 'bp_blogs_record_blog', 10, 2 );
     358
     359/**
     360 * bp_blogs_updated_option()
     361 *
     362 * Handles the syncing of updated options that we store in blogmeta
     363 *
     364 * @global object $wpdb Database object
     365 * @param string $option Name of option that's
     366 * @param string $oldvalue The previous option (not used here)
     367 * @param string $_newvalue The new value
     368 */
     369function bp_blogs_updated_option( $option, $oldvalue, $_newvalue ) {
     370    global $wpdb;
     371
     372    // Use switch so this can be extended later if needed
     373    switch ( $option ) {
     374        case 'name' :
     375        case 'description' :
     376            bp_blogs_update_blogmeta( $wpdb->blogid, $option, $_newvalue );
     377            break;
     378        default :
     379            break;
     380    }
     381}
     382add_action( 'updated_option', 'bp_blogs_update_option_blogname', 10, 3 );
    358383
    359384function bp_blogs_record_post( $post_id, $post, $user_id = false ) {
Note: See TracChangeset for help on using the changeset viewer.