parent_theme_file_uri
Filter HookDescription
Filters the URL to a file in the parent theme.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 4645 |
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 parent_theme_file_uri
add_filter('parent_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:4645
- How this hook is used in WordPress core
<?php
4640 * @since 4.7.0
4641 *
4642 * @param string $url The file URL.
4643 * @param string $file The requested file to search for.
4644 */
4645 return apply_filters( 'parent_theme_file_uri', $url, $file );
4646 }
4647
4648 /**
4649 * Retrieves the path of a file in the theme.
4650 *
PHP Documentation
<?php
/**
* Filters the URL to a file in the parent 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.