wp_xmlrpc_server::addTwoNumbers()publicWP 1.5.0

Test XMLRPC API by adding two numbers for client.

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

No Hooks.

Return

Int. Sum of the two given numbers.

Usage

$wp_xmlrpc_server = new wp_xmlrpc_server();
$wp_xmlrpc_server->addTwoNumbers( $args );
$args(array) (required)

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

  • 0(int)
    A number to add.

  • 1(int)
    A second number to add.

Changelog

Since 1.5.0 Introduced.

Код wp_xmlrpc_server::addTwoNumbers() WP 6.1.1

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