Filter hook 'theme_file_uri'

in WP Core File wp-includes/link-template.php at line 4617

View Source

theme_file_uri

Filter Hook
Description
Filters the URL to a file in the theme.

Hook Information

File Location wp-includes/link-template.php View on GitHub
Hook Type Filter
Line Number 4617

Hook Parameters

Type Name Description
string $url The file URL.
string $file The requested file to search for.

Usage Examples

Basic Usage
<?php
// Hook into theme_file_uri
add_filter('theme_file_uri', 'my_custom_filter', 10, 2);

function my_custom_filter($url, $file) {
    // Your custom filtering logic here
    return $url;
}

Source Code Context

wp-includes/link-template.php:4617 - How this hook is used in WordPress core
<?php
4612  	 * @since 4.7.0
4613  	 *
4614  	 * @param string $url  The file URL.
4615  	 * @param string $file The requested file to search for.
4616  	 */
4617  	return apply_filters( 'theme_file_uri', $url, $file );
4618  }
4619  
4620  /**
4621   * Retrieves the URL of a file in the parent theme.
4622   *

PHP Documentation

<?php
/**
	 * Filters the URL to a file in the theme.
	 *
	 * @since 4.7.0
	 *
	 * @param string $url  The file URL.
	 * @param string $file The requested file to search for.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/link-template.php
Related Hooks

Related hooks will be displayed here in future updates.