wp_xmlrpc_server::addTwoNumbers() WordPress Method
The wp_xmlrpc_server::addTwoNumbers() method is used to add two numbers together. This method is part of the XML-RPC API and is available in WordPress versions 4.4 and higher.
wp_xmlrpc_server::addTwoNumbers( array $args ) #
Test XMLRPC API by adding two numbers for client.
Contents
Parameters
- $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.
- 'number1'
Return
(int) Sum of the two given numbers.
Source
File: wp-includes/class-wp-xmlrpc-server.php
public function addTwoNumbers( $args ) { $number1 = $args[0]; $number2 = $args[1]; return $number1 + $number2; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |