Selain jawaban oleh @Welcher:
Ada beberapa contoh " kuburan " yang baik di inti, di mana " fungsi mati ".
Anda dapat menggunakannya sebagai pedoman, misalnya tentang dokumentasi.
Berikut adalah salah satu contoh untuk di permalink_link()
bawah iniwp-includes/deprecated.php
/**
* Print the permalink of the current post in the loop.
*
* @since 0.71
* @deprecated 1.2.0 Use the_permalink()
* @see the_permalink()
*/
function permalink_link() {
_deprecated_function( __FUNCTION__, '1.2', 'the_permalink()' );
the_permalink();
}
Inilah dokumentasi sebaris untuk _deprecated_function
fungsi yang menjelaskan argumen input:
/**
* Mark a function as deprecated and inform when it has been used.
*
* There is a hook deprecated_function_run that will be called that can be used
* to get the backtrace up to what file and function called the deprecated
* function.
*
* The current behavior is to trigger a user error if WP_DEBUG is true.
*
* This function is to be used in every function that is deprecated.
*
* @since 2.5.0
* @access private
*
* @param string $function The function that was called.
* @param string $version The version of WordPress that deprecated the function.
* @param string $replacement Optional. The function that should have been called.
* Default null.
*/