Uma área de pesquisa sobre o WordPress para devs e autores do tema



rest_handle_deprecated_argument ›

Desde4.4.0
Obsoleton/a
rest_handle_deprecated_argument ( $function, $message, $version )
Parâmetros: (3)
  • (string) $function The function that was called.
    Required: Yes
  • (string) $message A message regarding the change.
    Required: Yes
  • (string) $version Version.
    Required: Yes
Definido em:
Codex:

Handles _deprecated_argument() errors.



Fonte

function rest_handle_deprecated_argument( $function, $message, $version ) {
	if ( ! WP_DEBUG || headers_sent() ) {
		return;
	}
	if ( ! empty( $message ) ) {
		/* translators: 1: function name, 2: WordPress version number, 3: error message */
		$string = sprintf( __( '%1$s (since %2$s; %3$s)' ), $function, $version, $message );
	} else {
		/* translators: 1: function name, 2: WordPress version number */
		$string = sprintf( __( '%1$s (since %2$s; no alternative available)' ), $function, $version );
	}

	header( sprintf( 'X-WP-DeprecatedParam: %s', $string ) );
}