Changeset 3033
- Timestamp:
- 06/10/2010 07:43:47 PM (16 years ago)
- File:
-
- 1 edited
-
branches/1.2/bp-blogs.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-blogs.php
r3032 r3033 358 358 359 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 360 * bp_blogs_update_option_blogname() 361 * 362 * Updates blogname in BuddyPress blogmeta table 363 * 364 * @global object $wpdb DB Layer 365 * @param string $oldvalue Value before save (not used) 366 * @param string $newvalue Value to change meta to 368 367 */ 369 function bp_blogs_update d_option( $option, $oldvalue, $_newvalue ) {368 function bp_blogs_update_option_blogname( $oldvalue, $newvalue ) { 370 369 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 } 382 add_action( 'updated_option', 'bp_blogs_updated_option', 10, 3 ); 370 bp_blogs_update_blogmeta( $wpdb->blogid, 'name', $newvalue ); 371 } 372 add_action( 'update_option_blogname', 'bp_blogs_update_option_blogname', 10, 2 ); 373 374 /** 375 * bp_blogs_update_option_blogdescription() 376 * 377 * Updates blogdescription in BuddyPress blogmeta table 378 * 379 * @global object $wpdb DB Layer 380 * @param string $oldvalue Value before save (not used) 381 * @param string $newvalue Value to change meta to 382 */ 383 function bp_blogs_update_option_blogdescription( $oldvalue, $newvalue ) { 384 global $wpdb; 385 bp_blogs_update_blogmeta( $wpdb->blogid, 'description', $newvalue ); 386 } 387 add_action( 'update_option_blogdescription', 'bp_blogs_update_option_blogdescription', 10, 2 ); 383 388 384 389 function bp_blogs_record_post( $post_id, $post, $user_id = false ) {
Note: See TracChangeset
for help on using the changeset viewer.