_deprecated_file ( $file, $version, $replacement = '', $message = '' )

  • (string) file The file that was included.
  • (string) version The version of WordPress that deprecated the file.
  • (string) replacement Optional. The file that should have been included based on ABSPATH. Default empty string.
  • (string) message Optional. A message regarding the change. Default empty string.
Defined at:
Change Log:
  • 5: .
  • 5: .


Marks a file as deprecated and inform when it has been used.There is a {@see 'deprecated_file_included'} hook that will be called that can be used to get the backtrace up to what file and function included the deprecated file. The current behavior is to trigger a user error if `WP_DEBUG` is true. This function is to be used in every file that is deprecated.

Related Functions

ms_deprecated_blogs_file, _deprecated_class, _deprecated_function, _deprecated_hook, wp_delete_file

Top Google Results

User discussions

wpseek mobile