wp_xmlrpc_server::addTwoNumbers()publicWP 1.5.0

Tests XMLRPC API by adding two numbers for client.

Метод класса: wp_xmlrpc_server{}

Хуков нет.

Возвращает

int. Sum of the two given numbers.

Использование

$wp_xmlrpc_server = new wp_xmlrpc_server();
$wp_xmlrpc_server->addTwoNumbers( $args );
$args(массив) (обязательный)

Method arguments. Note: arguments must be ordered as documented.

  • 0(int)
    A number to add.

  • 1(int)
    A second number to add.

Список изменений

С версии 1.5.0 Введена.

Код wp_xmlrpc_server::addTwoNumbers() WP 6.6.2

public function addTwoNumbers( $args ) {
	$number1 = $args[0];
	$number2 = $args[1];
	return $number1 + $number2;
}