wp_xmlrpc_server::minimum_args
Checks if the method received at least the minimum number of arguments.
Метод класса: wp_xmlrpc_server{}
Хуков нет.
Возвращает
bool. True if $args contains at least $count arguments, false otherwise.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->minimum_args( $args, $count );
- $args(массив) (обязательный)
- An array of arguments to check.
- $count(int) (обязательный)
- Minimum number of arguments.
Список изменений
| С версии 3.4.0 | Введена. |
Код wp_xmlrpc_server::minimum_args() wp xmlrpc server::minimum args WP 7.1.5
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;
}