显示WordPress管理CSS文件的URL。

原型

wp_admin_css_uri( string $file = 'wp-admin' )

参数

$file (string) (Optional) 文件相对于wp-admin /没有“.css”扩展名。

返回值

(string)  

源文件

路径:wp-includes/general-template.php

<?php
...
function wp_admin_css_uri( $file = 'wp-admin' ) {
	if ( defined('WP_INSTALLING') ) {
		$_file = "./$file.css";
	} else {
		$_file = admin_url("$file.css");
	}
	$_file = add_query_arg( 'version', get_bloginfo( 'version' ),  $_file );
	/**
	 * Filters the URI of a WordPress admin CSS file.
	 *
	 * @since 2.3.0
	 *
	 * @param string $_file Relative path to the file with query arguments attached.
	 * @param string $file  Relative path to the file, minus its ".css" extension.
	 */
	return apply_filters( 'wp_admin_css_uri', $_file, $file );
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/wp_admin_css_uri/