wp_xmlrpc_server::minimum_args()
Checks if the method received at least the minimum number of arguments.
Method of the class: wp_xmlrpc_server{}
No Hooks.
Return
true|false
. True if $args contains at least $count arguments, false otherwise.
Usage
// protected - for code of main (parent) or child class $result = $this->minimum_args( $args, $count );
- $args(array) (required)
- An array of arguments to check.
- $count(int) (required)
- Minimum number of arguments.
Changelog
Since 3.4.0 | Introduced. |
wp_xmlrpc_server::minimum_args() wp xmlrpc server::minimum args code WP 6.7.1
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; }