since |
1.0 |
package |
bbPress |
subpackage |
Publishing |
uses |
IXR_Server |
inherited_from |
\IXR_Server |
Methods
BB_XMLRPC_Server()
BB_XMLRPC_Server()
IXR_Server()
IXR_Server($callbacks = false
, $data = false
, $wait = false
)
Inherited
Parameters
$callbacks
$data
$wait
Initialises the XML-RPC server
__construct() : void
since |
1.0 |
inherited_from |
\IXR_Server::__construct() |
__construct()
__construct($callbacks = false
, $data = false
, $wait = false
)
Inherited
Parameters
$callbacks
$data
$wait
Compiles site options into an array suitable to be passed back through the XML-RPC server
_getOptions(array $options) : array
Parameters
$options
array
An array of options to fetch and return
Returns
array
The site options in an array
Adds two numbers together as a demo of XML-RPC
addTwoNumbers(array $args) : integer
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
The sum of the two supplied numbers
Checks the user credentials supplied in the request to make sure they are valid
authenticate(string $user_login, string $user_pass, string $capability = 'read'
, string $message = false
) : integer | boolean
Parameters
$user_login
string
The users login
$user_pass
string
The users password in plain text
$capability
string
The capability to check (optional)
$message
string
The message to pass back in the error if the capability check fails (optional)
Returns
integer
boolean
The user id if the user is valid, otherwise false
Closes a topic
bb_closeTopic(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
0 when already changed, 1 when successfully changed or an IXR_Error object on failure
Deletes a forum
bb_deleteForum(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
1 when successfully deleted or an IXR_Error object on failure
Deletes an existing post
bb_deletePost(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
1 when successfully deleted, 0 when already deleted or an IXR_Error object on failure
Deletes a topic
bb_deleteTopic(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
0 if already changed, 1 when successfully changed or an IXR_Error object on failure
Destroys the specified tag
bb_destroyTopicTag(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
1 when successfully deleted or an IXR_Error object on failure
Edits an existing forum
bb_editForum(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
The forum data when successfully edited or an IXR_Error object on failure
Edits an existing post
bb_editPost(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
The post data when successfully edited or an IXR_Error object on failure
Edits an existing topic
bb_editTopic(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
The topic data when successfully edited or an IXR_Error object on failure
Returns details of a forum
bb_getForum($args) : array | object
Parameters
$args
Returns
array
object
An array containing details of the returned forum when successfully executed or an IXR_Error object on failure
Returns a numerical count of forums
bb_getForumCount(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
The number of forums when successfully executed or an IXR_Error object on failure
Returns details of multiple forums
bb_getForums(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
An array containing details of all returned forums when successfully executed or an IXR_Error object on failure
Gets the specified site options
bb_getOptions(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
An array containing the specified options when successfully executed or an IXR_Error object on failure
Returns details of a post
bb_getPost(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
An array containing details of the returned post when successfully executed or an IXR_Error object on failure
Returns a numerical count of posts
bb_getPostCount(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
The number of topics when successfully executed or an IXR_Error object on failure
Returns details of the posts in a given topic
bb_getPosts(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
The posts when successfully executed or an IXR_Error object on failure
Returns details of a topic
bb_getTopic($args) : array | object
Parameters
$args
Returns
array
object
An array containing details of the returned topic when successfully executed or an IXR_Error object on failure
Returns a numerical count of topics
bb_getTopicCount(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
The number of topics when successfully executed or an IXR_Error object on failure
Returns the topics which are tagged with the given tag
bb_getTopicTag(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
The topic data when successfully executed or an IXR_Error object on failure
Returns a numerical count of tags in a given topic or all tags
bb_getTopicTagCount(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
The number of topics when successfully executed or an IXR_Error object on failure
Returns details of the latest topics
bb_getTopics(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
The topics when successfully executed or an IXR_Error object on failure
Moves a topic to a different forum
bb_moveTopic(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
the forum id where the topic lives after the method is called or an IXR_Error object on failure
Creates a new forum
bb_newForum(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
The forum data when successfully created or an IXR_Error object on failure
Creates a new post in a given topic
bb_newPost(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
The post data when successfully created or an IXR_Error object on failure
Creates a new topic
bb_newTopic(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
The topic data when successfully created or an IXR_Error object on failure
Renames the specified tag to a new tag name
bb_renameTopicTag(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
The tag data when successfully renamed or an IXR_Error object on failure
Sets the specified site options to the specified values
bb_setOptions(array $args) : array | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
object
An array containing the specified options when successfully executed or an IXR_Error object on failure
Sticks a topic to the top of a forum or the front page
bb_stickTopic(array $args) : integer | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
integer
object
0 if it is already stuck to the desired location, 1 when successfully stuck or an IXR_Error object on failure
call()
call($methodname, $args)
Inherited
Parameters
$methodname
$args
error()
error($error, $message = false
)
Inherited
Parameters
$error
$message
Sanitises data from XML-RPC request parameters
escape($array) : mixed
Parameters
$array
mixed The variable to be sanitised
Returns
mixed
The sanitised variable, should come back with the same type
getCapabilities()
getCapabilities($args)
Inherited
hasMethod()
hasMethod($method)
Inherited
Initialises site options which can be manipulated using XML-RPC
initialise_site_option_info() : void
listMethods()
listMethods($args)
Inherited
multiCall()
multiCall($methodcalls)
Inherited
output()
output($xml)
Inherited
Returns an array of URLs that pingbacked the given URL
pingback_extensions_getPingbacks(array $args) : array
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
array
The array of URLs that pingbacked the given topic
Processes pingback requests
pingback_ping(array $args) : string | object
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
string
object
A message of success or an IXR_Error object on failure
Prepares forum data for return in an XML-RPC object
prepare_forum(array | object $forum) : array
Parameters
$forum
array
object
The unprepared forum data
Returns
array
The prepared forum data
Prepares post data for return in an XML-RPC object
prepare_post(array | object $post) : array
Parameters
$post
array
object
The unprepared post data
Returns
array
The prepared post data
Prepares topic data for return in an XML-RPC object
prepare_topic(array | object $topic) : array
Parameters
$topic
array
object
The unprepared topic data
Returns
array
The prepared topic data
Prepares topic tag data for return in an XML-RPC object
prepare_topic_tag(array | object $tag) : array
Parameters
$tag
array
object
The unprepared topic tag data
Returns
array
The prepared topic tag data
Hello world demo function for XML-RPC
sayHello(array $args) : string
Parameters
$args
array
Arguments passed by the XML-RPC call
Returns
string
The phrase 'Hello!'
serve()
serve($data = false
)
Inherited
setCallbacks()
setCallbacks()
Inherited
setCapabilities()
setCapabilities()
Inherited
Switches the currently active user for incognito actions
switch_user(string $user_login, string $capability = 'read'
, string $message = false
) : integer | boolean
Parameters
$user_login
string
The users login
$capability
string
The capability to check (optional)
$message
string
The message to pass back in the error if the capability check fails (optional)
Returns
integer
boolean
The user id if the user is valid, otherwise false
Properties
Whether user switching is allowed
$allow_user_switching : boolean
Whether read-only methods require authentication
$auth_readonly : boolean
$capabilities
$capabilities
Stores the last error generated by the class
$error : object | boolean
Site options which can be manipulated using XML-RPC
$site_options : array