Filter hook 'parent_theme_file_path'

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

View Source

parent_theme_file_path

Filter Hook
Description
Filters the path to a file in the parent theme.

Hook Information

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

Hook Parameters

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

Usage Examples

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

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

Source Code Context

wp-includes/link-template.php:4709 - How this hook is used in WordPress core
<?php
4704  	 * @since 4.7.0
4705  	 *
4706  	 * @param string $path The file path.
4707  	 * @param string $file The requested file to search for.
4708  	 */
4709  	return apply_filters( 'parent_theme_file_path', $path, $file );
4710  }
4711  
4712  /**
4713   * Retrieves the URL to the privacy policy page.
4714   *

PHP Documentation

<?php
/**
	 * Filters the path to a file in the parent theme.
	 *
	 * @since 4.7.0
	 *
	 * @param string $path The file path.
	 * @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.