Changeset 11150 for trunk/src/bp-blogs/bp-blogs-functions.php
- Timestamp:
- 09/22/2016 12:35:27 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-functions.php
r10971 r11150 477 477 478 478 /** 479 * Syncs site icon URLs to blogmeta. 480 * 481 * @since 2.7.0 482 * 483 * @param int|string $old_value Old value 484 * @param int|string $new_value New value 485 */ 486 function bp_blogs_update_option_site_icon( $old_value, $new_value ) { 487 if ( 0 === $new_value ) { 488 bp_blogs_update_blogmeta( get_current_blog_id(), 'site_icon_url_thumb', 0 ); 489 bp_blogs_update_blogmeta( get_current_blog_id(), 'site_icon_url_full', 0 ); 490 } else { 491 // Save site icon URL as blogmeta. 492 bp_blogs_update_blogmeta( get_current_blog_id(), 'site_icon_url_thumb', get_site_icon_url( bp_core_avatar_thumb_width() ) ); 493 bp_blogs_update_blogmeta( get_current_blog_id(), 'site_icon_url_full', get_site_icon_url( bp_core_avatar_full_width() ) ); 494 } 495 } 496 add_action( 'update_option_site_icon', 'bp_blogs_update_option_site_icon', 10, 2 ); 497 498 /** 479 499 * Deletes the 'url' blogmeta for a site. 480 500 *
Note: See TracChangeset
for help on using the changeset viewer.