This changeset enables smooth transitions between the different admin screens. For the admin menu items, distinct view transition names are used to facilitate a simple visual slide effect when the active submenu changes between screens. Props westonruter, mukesh27, joedolson. Fixes #64470. Built from https://develop.svn.wordpress.org/trunk@61491 git-svn-id: http://core.svn.wordpress.org/trunk@60802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
31 lines
602 B
PHP
31 lines
602 B
PHP
<?php
|
|
/**
|
|
* View Transitions API.
|
|
*
|
|
* @package WordPress
|
|
* @subpackage View Transitions
|
|
* @since 7.0.0
|
|
*/
|
|
|
|
/**
|
|
* Enqueues View Transitions CSS for the admin.
|
|
*
|
|
* @since 7.0.0
|
|
*/
|
|
function wp_enqueue_view_transitions_admin_css(): void {
|
|
wp_enqueue_style( 'wp-view-transitions-admin' );
|
|
}
|
|
|
|
/**
|
|
* Gets the CSS for View Transitions in the admin.
|
|
*
|
|
* @since 7.0.0
|
|
*
|
|
* @return string The CSS.
|
|
*/
|
|
function wp_get_view_transitions_admin_css(): string {
|
|
$affix = SCRIPT_DEBUG ? '' : '.min';
|
|
$path = ABSPATH . "wp-admin/css/view-transitions{$affix}.css";
|
|
return file_get_contents( $path );
|
|
}
|