jetpack_dashboard_switcher_changed_view

jetpack_dashboard_switcher_changed_view

Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: jetpack.14.1

do_action('jetpack_dashboard_switcher_changed_view') is found 1 times:

  • /jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-base-admin-menu.php line 702
    		 *
    		 * @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.
    

See this hook used in plugins: