wp_admin_css_uri() WordPress Function

The wp_admin_css_uri() function is used to retrieve the URL of the admin CSS file. This function is located in the wp-admin/includes/file.php file.

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

Displays the URL of a WordPress admin CSS file.


Description

Top ↑

See also


Top ↑

Parameters

$file

(string)(Optional)file relative to wp-admin/ without its ".css" extension.

Default value: 'wp-admin'


Top ↑

Return

(string)


Top ↑

Source

File: wp-includes/general-template.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 );
}


Top ↑

Changelog

Changelog
VersionDescription
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More