Inheritances
Files
Overview
FRAMES
NO FRAMES

Class wp_xmlrpc_server

IXR_Server
|
wp_xmlrpc_server
WordPress
|-WordPress_Publishing
|- class wp_xmlrpc_server extends IXR_Server
Defined in line 115 of file xmlrpc.php.
WordPress XMLRPC server implementation.

Implements compatability for Blogger API, MetaWeblog API, MovableType, and
pingback. Additional WordPress API for managing comments, pages, posts,
options, etc.

Since WordPress 2.6.0, WordPress XMLRPC server can be disabled in the
administration panels.
PackageWordPress
SubpackagePublishing
Since1.5.0

Summary

Instance methods
+ _getOptions() Retrieve blog options value from list
+ _multisite_getUsersBlogs() Private function for retrieving a users blogs for multisite setups
+ addTwoNumbers() Test XMLRPC API by adding two numbers for client
+ add_enclosure_if_new()
+ attach_uploads() Attach upload to a post
+ blogger_deletePost() Remove a post
+ blogger_editPost() Edit a post
+ blogger_getPost() Retrieve post
+ blogger_getRecentPosts() Retrieve list of recent posts
+ blogger_getTemplate() Retrieve blog_filename content
+ blogger_getUserInfo() Retrieve user's data.
+ blogger_getUsersBlogs() Retrieve blogs that user owns.
+ blogger_newPost() Create new post
+ blogger_setTemplate() Updates the content of blog_filename
+ escape() Sanitize string or array of strings for database
+ get_custom_fields() Retrieve custom fields for post
+ initialise_blog_option_info() Set up blog options property.
+ login() Log user in
+ login_pass_ok() Check user's credentials
+ mt_getCategoryList() Retrieve list of all categories on blog
+ mt_getPostCategories() Retrieve post categories
+ mt_getRecentPostTitles() Retrieve the post titles of recent posts
+ mt_getTrackbackPings() Retrieve trackbacks sent to a given post
+ mt_publishPost() Sets a post's publish status to 'publish'
+ mt_setPostCategories() Sets categories for a post
+ mt_supportedMethods() Retrieve an array of methods supported by this server
+ mt_supportedTextFilters() Retrieve an empty array because we don't support per-post text filters
+ mw_editPost() Edit a post
+ mw_getCategories() Retrieve the list of categories on a given blog
+ mw_getPost() Retrieve post
+ mw_getRecentPosts() Retrieve list of recent posts
+ mw_newMediaObject() Uploads a file, following your settings.
+ mw_newPost() Create a new post
+ pingback_extensions_getPingbacks() Retrieve array of URLs that pingbacked the given URL.
+ pingback_ping() Retrieves a pingback and registers it
+ sayHello() Test XMLRPC API by saying, "Hello!" to client
+ serve_request()
+ set_custom_fields() Set custom fields for post
+ wp_deleteCategory() Remove category
+ wp_deleteComment() Remove comment
+ wp_deletePage() Delete page
+ wp_editComment() Edit comment
+ wp_editPage() Edit page
+ wp_getAuthors() Retrieve authors list
+ wp_getComment() Retrieve comment
+ wp_getCommentCount() Retrieve comment count
+ wp_getCommentStatusList() Retrieve all of the comment status
+ wp_getComments() Retrieve comments
+ wp_getOptions() Retrieve blog options
+ wp_getPage() Retrieve page
+ wp_getPageList() Retrieve page list
+ wp_getPageStatusList() Retrieve page statuses
+ wp_getPageTemplates() Retrieve page templates
+ wp_getPages() Retrieve Pages
+ wp_getPostStatusList() Retrieve post statuses
+ wp_getTags() Get list of all tags
+ wp_getUsersBlogs() Retrieve the blogs of the user
+ wp_newCategory() Create new category
+ wp_newComment() Create new comment
+ wp_newPage() Create new page
+ wp_setOptions() Update blog options
+ wp_suggestCategories() Retrieve category list
+ wp_xmlrpc_server() Register all of the XMLRPC methods that XMLRPC server understands.

Details

Instance methods

_getOptions()
function _getOptions( $options)
Retrieve blog options value from list.
Parameters
array $options Options to retrieve.
Returns array
Since 2.6.0
_multisite_getUsersBlogs()
function _multisite_getUsersBlogs( $args)
Private function for retrieving a users blogs for multisite setups
Parameters
$args
Access protected
addTwoNumbers()
function addTwoNumbers( $args)
Test XMLRPC API by adding two numbers for client.
Parameters
array $args Method Parameters.
Returns int
Since 1.5.0
add_enclosure_if_new()
function add_enclosure_if_new( $post_ID
$enclosure
)
Parameters
$post_ID
$enclosure
attach_uploads()
function attach_uploads( $post_ID
$post_content
)
Attach upload to a post.
Parameters
int $post_ID Post ID.
string $post_content Post Content for attachment.
Since 2.1.0
blogger_deletePost()
function blogger_deletePost( $args)
Remove a post.
Parameters
array $args Method parameters.
Returns bool True when post is deleted.
Since 1.5.0
blogger_editPost()
function blogger_editPost( $args)
Edit a post.
Parameters
array $args Method parameters.
Returns bool true when done.
Since 1.5.0
blogger_getPost()
function blogger_getPost( $args)
Retrieve post.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
blogger_getRecentPosts()
function blogger_getRecentPosts( $args)
Retrieve list of recent posts.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
blogger_getTemplate()
function blogger_getTemplate( $args)
Retrieve blog_filename content.
Parameters
array $args Method parameters.
Returns string
Since 1.5.0
blogger_getUserInfo()
function blogger_getUserInfo( $args)
Retrieve user's data.

Gives your client some info about you, so you don't have to.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
blogger_getUsersBlogs()
function blogger_getUsersBlogs( $args)
Retrieve blogs that user owns.

Will make more sense once we support multiple blogs.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
blogger_newPost()
function blogger_newPost( $args)
Create new post.
Parameters
array $args Method parameters.
Returns int
Since 1.5.0
blogger_setTemplate()
function blogger_setTemplate( $args)
Updates the content of blog_filename.
Parameters
array $args Method parameters.
Returns bool True when done.
Since 1.5.0
escape()
function escape( &$array)
Sanitize string or array of strings for database.
Parameters
string|array $array Sanitize single string or array of strings.
Returns string|array Type matches $array and sanitized for the database.
Since 1.5.2
get_custom_fields()
function get_custom_fields( $post_id)
Retrieve custom fields for post.
Parameters
int $post_id Post ID.
Returns array Custom fields, if exist.
Since 2.5.0
initialise_blog_option_info()
function initialise_blog_option_info( )
Set up blog options property.

Passes property through 'xmlrpc_blog_options' filter.
Since 2.6.0
login()
function login( $username
$password
)
Log user in.
Parameters
string $username User's username.
string $password User's password.
Returns mixed WP_User object if authentication passed, false otherwise
Since 2.8
login_pass_ok() Deprecated
function login_pass_ok( $user_login
$user_pass
)
Check user's credentials.
Parameters
string $user_login User's username.
string $user_pass User's password.
Returns bool Whether authentication passed.
See also wp_xmlrpc_server::login
Since 1.5.0
mt_getCategoryList()
function mt_getCategoryList( $args)
Retrieve list of all categories on blog.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
mt_getPostCategories()
function mt_getPostCategories( $args)
Retrieve post categories.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
mt_getRecentPostTitles()
function mt_getRecentPostTitles( $args)
Retrieve the post titles of recent posts.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
mt_getTrackbackPings()
function mt_getTrackbackPings( $args)
Retrieve trackbacks sent to a given post.
Parameters
array $args Method parameters.
Returns mixed
Since 1.5.0
mt_publishPost()
function mt_publishPost( $args)
Sets a post's publish status to 'publish'.
Parameters
array $args Method parameters.
Returns int
Since 1.5.0
mt_setPostCategories()
function mt_setPostCategories( $args)
Sets categories for a post.
Parameters
array $args Method parameters.
Returns bool True on success.
Since 1.5.0
mt_supportedMethods()
function mt_supportedMethods( $args)
Retrieve an array of methods supported by this server.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
mt_supportedTextFilters()
function mt_supportedTextFilters( $args)
Retrieve an empty array because we don't support per-post text filters.
Parameters
array $args Method parameters.
Since 1.5.0
mw_editPost()
function mw_editPost( $args)
Edit a post.
Parameters
array $args Method parameters.
Returns bool True on success.
Since 1.5.0
mw_getCategories()
function mw_getCategories( $args)
Retrieve the list of categories on a given blog.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
mw_getPost()
function mw_getPost( $args)
Retrieve post.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
mw_getRecentPosts()
function mw_getRecentPosts( $args)
Retrieve list of recent posts.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
mw_newMediaObject()
function mw_newMediaObject( $args)
Uploads a file, following your settings.

Adapted from a patch by Johann Richard.
Parameters
array $args Method parameters.
Returns array
See also http://mycvs.org/archives/2004/06/30/file-upload-to-wordpress-in-ecto/
Since 1.5.0
mw_newPost()
function mw_newPost( $args)
Create a new post.
Parameters
array $args Method parameters.
Returns int
Since 1.5.0
pingback_extensions_getPingbacks()
function pingback_extensions_getPingbacks( $args)
Retrieve array of URLs that pingbacked the given URL.

Specs on http://www.aquarionics.com/misc/archives/blogite/0198.html
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
pingback_ping()
function pingback_ping( $args)
Retrieves a pingback and registers it.
Parameters
array $args Method parameters.
Returns array
Since 1.5.0
sayHello()
function sayHello( $args)
Test XMLRPC API by saying, "Hello!" to client.
Parameters
array $args Method Parameters.
Returns string
Since 1.5.0
serve_request()
function serve_request( )
set_custom_fields()
function set_custom_fields( $post_id
$fields
)
Set custom fields for post.
Parameters
int $post_id Post ID.
array $fields Custom fields.
Since 2.5.0
wp_deleteCategory()
function wp_deleteCategory( $args)
Remove category.
Parameters
array $args Method parameters.
Returns mixed See wp_delete_category() for return info.
Since 2.5.0
wp_deleteComment()
function wp_deleteComment( $args)
Remove comment.
Parameters
array $args Method parameters.
Returns mixed wp_delete_comment()
Since 2.7.0
wp_deletePage()
function wp_deletePage( $args)
Delete page.
Parameters
array $args Method parameters.
Returns bool True, if success.
Since 2.2.0
wp_editComment()
function wp_editComment( $args)
Edit comment.
Parameters
array $args Method parameters.
Returns bool True, on success.
Since 2.7.0
wp_editPage()
function wp_editPage( $args)
Edit page.
Parameters
array $args Method parameters.
Returns unknown
Since 2.2.0
wp_getAuthors()
function wp_getAuthors( $args)
Retrieve authors list.
Parameters
array $args Method parameters.
Returns array
Since 2.2.0
wp_getComment()
function wp_getComment( $args)
Retrieve comment.
Parameters
array $args Method parameters.
Returns array
Since 2.7.0
wp_getCommentCount()
function wp_getCommentCount( $args)
Retrieve comment count.
Parameters
array $args Method parameters.
Returns array
Since 2.5.0
wp_getCommentStatusList()
function wp_getCommentStatusList( $args)
Retrieve all of the comment status.
Parameters
array $args Method parameters.
Returns array
Since 2.7.0
wp_getComments()
function wp_getComments( $args)
Retrieve comments.
Parameters
array $args Method parameters.
Returns array
Since 2.7.0
wp_getOptions()
function wp_getOptions( $args)
Retrieve blog options.
Parameters
array $args Method parameters.
Returns array
Since 2.6.0
wp_getPage()
function wp_getPage( $args)
Retrieve page.
Parameters
array $args Method parameters.
Returns array
Since 2.2.0
wp_getPageList()
function wp_getPageList( $args)
Retrieve page list.
Parameters
array $args Method parameters.
Returns unknown
Since 2.2.0
wp_getPageStatusList()
function wp_getPageStatusList( $args)
Retrieve page statuses.
Parameters
array $args Method parameters.
Returns array
Since 2.5.0
wp_getPageTemplates()
function wp_getPageTemplates( $args)
Retrieve page templates.
Parameters
array $args Method parameters.
Returns array
Since 2.6.0
wp_getPages()
function wp_getPages( $args)
Retrieve Pages.
Parameters
array $args Method parameters.
Returns array
Since 2.2.0
wp_getPostStatusList()
function wp_getPostStatusList( $args)
Retrieve post statuses.
Parameters
array $args Method parameters.
Returns array
Since 2.5.0
wp_getTags()
function wp_getTags( $args)
Get list of all tags
Parameters
array $args Method parameters.
Returns array
Since 2.7
wp_getUsersBlogs()
function wp_getUsersBlogs( $args)
Retrieve the blogs of the user.
Parameters
array $args Method parameters.
Returns array
Since 2.6.0
wp_newCategory()
function wp_newCategory( $args)
Create new category.
Parameters
array $args Method parameters.
Returns int Category ID.
Since 2.2.0
wp_newComment()
function wp_newComment( $args)
Create new comment.
Parameters
array $args Method parameters.
Returns mixed wp_new_comment()
Since 2.7.0
wp_newPage()
function wp_newPage( $args)
Create new page.
Parameters
array $args Method parameters.
Returns unknown
Since 2.2.0
wp_setOptions()
function wp_setOptions( $args)
Update blog options.
Parameters
array $args Method parameters.
Returns unknown
Since 2.6.0
wp_suggestCategories()
function wp_suggestCategories( $args)
Retrieve category list.
Parameters
array $args Method parameters.
Returns array
Since 2.2.0
wp_xmlrpc_server()
function wp_xmlrpc_server( )
Register all of the XMLRPC methods that XMLRPC server understands.

PHP4 constructor and sets up server and method property. Passes XMLRPC
methods through the 'xmlrpc_methods' filter to allow plugins to extend
or replace XMLRPC methods.
Since 1.5.0