Error_Handler::doing_it_wrong( string $function, string $message, string $version )

Marks something as being incorrectly called.

Description

See also

Parameters

$function

(string) (Required) The function that was called.

$message

(string) (Required) A message explaining what has been done incorrectly.

$version

(string) (Required) The version of the plugin where the message was added.

Source

File: src/error-handler.php

	public function doing_it_wrong( $function, $message, $version ) {
		do_action( 'doing_it_wrong_run', $function, $message, $version );

		if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
			if ( is_null( $version ) ) {
				$version = '';
			} else {
				$version = ' ' . sprintf( $this->get_translation( 'added_in_version' ), $version );
			}

			$message = sprintf( $this->get_translation( 'called_incorrectly' ), $function, $message . $version );

			torro()->logger()->debug( $message );
		}
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.