wp_xmlrpc_server::minimum_args( array $args, int $count ): bool

In this article

Checks if the method received at least the minimum number of arguments.

Parameters

$argsarrayrequired
An array of arguments to check.
$countintrequired
Minimum number of arguments.

Return

bool True if $args contains at least $count arguments, false otherwise.

Source

protected function minimum_args( $args, $count ) {
	if ( ! is_array( $args ) || count( $args ) < $count ) {
		$this->error = new IXR_Error( 400, __( 'Insufficient arguments passed to this XML-RPC method.' ) );
		return false;
	}

	return true;
}

Changelog

VersionDescription
3.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.