Changeset 47105 for trunk/src/wp-includes/ms-blogs.php
- Timestamp:
- 01/22/2020 08:51:26 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r46823 r47105 509 509 * 510 510 * @since MU (3.0.0) 511 * @since 5.4.0 The `$context` parameter was added. 511 512 * 512 * @param int $new_blog_id New blog ID. 513 * @param int $prev_blog_id Previous blog ID. 513 * @param int $new_blog_id New blog ID. 514 * @param int $prev_blog_id Previous blog ID. 515 * @param string $context Additional context. Accepts 'switch' when called from switch_to_blog() 516 * or 'restore' when called from restore_current_blog(). 514 517 */ 515 do_action( 'switch_blog', $new_blog_id, $prev_blog_id );518 do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'switch' ); 516 519 $GLOBALS['switched'] = true; 517 520 return true; … … 545 548 546 549 /** This filter is documented in wp-includes/ms-blogs.php */ 547 do_action( 'switch_blog', $new_blog_id, $prev_blog_id );550 do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'switch' ); 548 551 $GLOBALS['switched'] = true; 549 552 … … 578 581 if ( $new_blog_id == $prev_blog_id ) { 579 582 /** This filter is documented in wp-includes/ms-blogs.php */ 580 do_action( 'switch_blog', $new_blog_id, $prev_blog_id );583 do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'restore' ); 581 584 // If we still have items in the switched stack, consider ourselves still 'switched' 582 585 $GLOBALS['switched'] = ! empty( $GLOBALS['_wp_switched_stack'] ); … … 612 615 613 616 /** This filter is documented in wp-includes/ms-blogs.php */ 614 do_action( 'switch_blog', $new_blog_id, $prev_blog_id );617 do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'restore' ); 615 618 616 619 // If we still have items in the switched stack, consider ourselves still 'switched'
Note: See TracChangeset
for help on using the changeset viewer.