wp_xmlrpc_server::addTwoNumbers( array $args ): int

In this article

Tests XMLRPC API by adding two numbers for client.

Parameters

$argsarrayrequired
Method arguments. Note: arguments must be ordered as documented.
  • 0 int
    A number to add.
  • 1 int
    A second number to add.

Return

int Sum of the two given numbers.

Source

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

Changelog

VersionDescription
1.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.