@Welcher의 답변 외에도 :
핵심 에는 몇 가지 좋은 " 묘지 "예제가 있으며, 여기서 " 기능이 죽게됩니다 ".
문서와 같은 지침으로 사용할 수 있습니다.
permalink_link()
아래에 대한 그러한 예가 있습니다 .wp-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();
}
_deprecated_function
입력 인수를 설명하는 함수에 대한 인라인 설명서는 다음과 같습니다 .
/**
* 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.
*/