WordPress at a glance
function is not described

wp_xmlrpc_server::addTwoNumbers() public WP 1.5.0

Test XMLRPC API by adding two numbers for client.

{} It's a method of the class: 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.

  • number1(int)
    A number to add.

  • number2(int)
    A second number to add.

Changelog

Since 1.5.0 Introduced.

Code of wp_xmlrpc_server::addTwoNumbers() WP 5.5.3

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