_deprecated_file


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

Access:
  • private
Parameters:
  • (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 null.
  • (string) $message Optional. A message regarding the change. Default empty.
Defined at:

Description

Mark a file as deprecated and inform when it has been used.

There is a hook {@see 'deprecated_file_included'} 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_function, _deprecated_hook, wp_delete_file, _deprecated_argument

Top Google Results

User discussions

wpseek mobile