get_theme_file_uri

Advertisement

Summery Summery

Retrieves the URL of a file in the theme.

Syntax Syntax

get_theme_file_uri( string $file = '' )

Description Description

Searches in the stylesheet directory before the template directory so themes which inherit from a parent theme can just override one file.

Parameters Parameters

$file

(Optional) File to search for in the stylesheet directory.

Default value: ''

Return Return

(string) The URL of the file.

Source Source

File: wp-includes/link-template.php

	 *
	 * @since 4.2.0
	 *
	 * @param array $args        Arguments passed to get_avatar_data(), after processing.
	 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user ID, Gravatar MD5 hash,
	 *                           user email, WP_User object, WP_Post object, or WP_Comment object.
	 */
	return apply_filters( 'get_avatar_data', $args, $id_or_email );
}

/**
 * Retrieves the URL of a file in the theme.
 *
 * Searches in the stylesheet directory before the template directory so themes
 * which inherit from a parent theme can just override one file.
 *
 * @since 4.7.0
 *
 * @param string $file Optional. File to search for in the stylesheet directory.
 * @return string The URL of the file.
 */

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply