jetpack_dashboard_switcher_changed_view, $current_screen, $preferred_view
jetpack_dashboard_switcher_changed_view, $current_screen, $preferred_view
Appears in: jetpack.16.0.1
Hook Type: action
Displaying hooks found in version: jetpack.16.0.1do_action('jetpack_dashboard_switcher_changed_view, $current_screen, $preferred_view') is found 1 times:
- /jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-base-admin-menu.php line 692
* * @param string The current screen of the user. * @param string The preferred view the user selected. */ \do_action( 'jetpack_dashboard_switcher_changed_view', $current_screen, $preferred_view ); if ( self::DEFAULT_VIEW === $preferred_view ) { // Redirect to default view if that's the newly preferred view. $menu_mappings = require __DIR__ . '/menu-mappings.php'; if ( isset( $menu_mappings[ $current_screen ] ) ) { // Using `wp_redirect` intentionally because we're redirecting to Calypso.