wp_xmlrpc_server::addTwoNumbers()publicWP 1.5.0

Tests XMLRPC API by adding two numbers for client.

Method of the class: wp_xmlrpc_server{}

No Hooks.


Int. Sum of the two given numbers.


$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.


Since 1.5.0 Introduced.

wp_xmlrpc_server::addTwoNumbers() code WP 6.4.3

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