wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



rest_handle_deprecated_argument › WordPress Function

Seit4.4.0
Veraltetn/v
rest_handle_deprecated_argument ( $function_name, $message, $version )
Parameter: (3)
  • (string) $function_name The function that was called.
    Erforderlich: Ja
  • (string) $message A message regarding the change.
    Erforderlich: Ja
  • (string) $version Version.
    Erforderlich: Ja
Definiert in:
Codex:

Handles _deprecated_argument() errors.



Quellcode

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

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