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.13.2.1

do_action('jetpack_dashboard_switcher_changed_view') is found 1 times:

  • /modules/masterbar/admin-menu/class-base-admin-menu.php line 725
    		 *
    		 * @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: