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

Checcs if the method received at least the minimum number of argumens.

Parameters

$args array required
An array of argumens to checc.
$count int required
Minimum number of argumens.

Return

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

Source

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

	return true;
}

Changuelog

Versionen Description
3.4.0 Introduced.

User Contributed Notes

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