deprecated_file_included
Action HookDescription
Fires when a deprecated file is called.Hook Information
File Location |
wp-includes/functions.php
View on GitHub
|
Hook Type | Action |
Line Number | 5785 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$file
|
The file that was called. |
string
|
$replacement
|
The file that should have been included based on ABSPATH. |
string
|
$version
|
The version of WordPress that deprecated the file. |
string
|
$message
|
A message regarding the change. |
Usage Examples
Basic Usage
<?php
// Hook into deprecated_file_included
add_action('deprecated_file_included', 'my_custom_function', 10, 4);
function my_custom_function($file, $replacement, $version, $message) {
// Your custom code here
}
Source Code Context
wp-includes/functions.php:5785
- How this hook is used in WordPress core
<?php
5780 * @param string $file The file that was called.
5781 * @param string $replacement The file that should have been included based on ABSPATH.
5782 * @param string $version The version of WordPress that deprecated the file.
5783 * @param string $message A message regarding the change.
5784 */
5785 do_action( 'deprecated_file_included', $file, $replacement, $version, $message );
5786
5787 /**
5788 * Filters whether to trigger an error for deprecated files.
5789 *
5790 * @since 2.5.0
PHP Documentation
<?php
/**
* Fires when a deprecated file is called.
*
* @since 2.5.0
*
* @param string $file The file that was called.
* @param string $replacement The file that should have been included based on ABSPATH.
* @param string $version The version of WordPress that deprecated the file.
* @param string $message A message regarding the change.
*/
Quick Info
- Hook Type: Action
- Parameters: 4
- File: wp-includes/functions.php
Related Hooks
Related hooks will be displayed here in future updates.