Changeset 29668
- Timestamp:
- 09/02/2014 07:29:47 AM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r29667 r29668 236 236 * @since MU 237 237 * 238 * @param int $blog_id Blog ID239 */ 240 function refresh_blog_details( $blog_id ) {238 * @param int $blog_id Optional. Blog ID. Defaults to current blog. 239 */ 240 function refresh_blog_details( $blog_id = 0 ) { 241 241 $blog_id = (int) $blog_id; 242 if ( ! $blog_id ) { 243 $blog_id = get_current_blog_id(); 244 } 245 242 246 $details = get_blog_details( $blog_id, false ); 243 247 if ( ! $details ) { … … 262 266 */ 263 267 do_action( 'refresh_blog_details', $blog_id ); 264 }265 266 /**267 * Refresh blog details when an option is updated.268 *269 * @access private270 * @param string $option_name271 */272 function _wp_refresh_blog_details_on_updated_option( $option_name ) {273 $options = array( 'blogname', 'siteurl', 'post_count' );274 if ( in_array( $option_name, $options ) ) {275 refresh_blog_details( get_current_blog_id() );276 }277 268 } 278 269 -
trunk/src/wp-includes/ms-default-filters.php
r28881 r29668 72 72 73 73 // Some options changes should trigger blog details refresh. 74 add_action( 'updated_option', '_wp_refresh_blog_details_on_updated_option' ); 74 add_action( 'update_option_blogname', 'refresh_blog_details', 10, 0 ); 75 add_action( 'update_option_siteurl', 'refresh_blog_details', 10, 0 ); 76 add_action( 'update_option_post_count', 'refresh_blog_details', 10, 0 ); 75 77 76 78 // If the network upgrade hasn't run yet, assume ms-files.php rewriting is used.
Note: See TracChangeset
for help on using the changeset viewer.