wp_enqueue_view_transitions_admin_css()

Enqueues View Transitions CSS for the admin.

Source

function wp_enqueue_view_transitions_admin_css(): void {
	wp_enqueue_style( 'wp-view-transitions-admin' );
}

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    If you want to disable the View Transitions CSS in wp-admin (for example,if it conflicts with a custom admin theme or a plugin), you can dequeue and deregister the style on ‘admin_enqueue_scripts’ with a late priority:

    add_action( ‘admin_enqueue_scripts’, function () {
    wp_dequeue_style( ‘wp-view-transitions-admin’ );
    wp_deregister_style( ‘wp-view-transitions-admin’ );
    }, 999 );

    Note that this function itself doesn’t accept any filter to bypass it; it unconditionally enqueues the style whenever it’s called, so removing the style afterwards is currently the most reliable way to opt out.

You must log in before being able to contribute a note or feedback.