wp_xmlrpc_server::escape( string|array $data )
Escape string or array of strings for database.
Description #Description
Parameters #Parameters
- $data
-
(string|array) (Required) Escape single string or array of strings.
Return #Return
(string|void) Returns with string is passed, alters by-reference when array is passed.
Source #Source
File: wp-includes/class-wp-xmlrpc-server.php
public function escape( &$data ) { if ( ! is_array( $data ) ) { return wp_slash( $data ); } foreach ( $data as &$v ) { if ( is_array( $v ) ) { $this->escape( $v ); } elseif ( ! is_object( $v ) ) { $v = wp_slash( $v ); } } }
Expand full source code Collapse full source code View on Trac
Changelog #Changelog
Version | Description |
---|---|
1.5.2 | Introduced. |
Related #Related
Uses #Uses
Uses | Description |
---|---|
wp-includes/formatting.php: wp_slash() |
Add slashes to a string or array of strings. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::escape() |
Escape string or array of strings for database. |
Used By #Used By
Used By | Description |
---|---|
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_getPostCategories() |
Retrieve post categories. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_setPostCategories() |
Sets categories for a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_publishPost() |
Sets a post’s publish status to ‘publish’. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::pingback_ping() |
Retrieves a pingback and registers it. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::pingback_extensions_getPingbacks() |
Retrieve array of URLs that pingbacked the given URL. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_editPost() |
Edit a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_getPost() |
Retrieve post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_getRecentPosts() |
Retrieve list of recent posts. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_getCategories() |
Retrieve the list of categories on a given blog. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_newMediaObject() |
Uploads a file, following your settings. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_getRecentPostTitles() |
Retrieve the post titles of recent posts. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mt_getCategoryList() |
Retrieve list of all categories on blog. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_getUserInfo() |
Retrieve user’s data. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_getPost() |
Retrieve post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_getRecentPosts() |
Retrieve list of recent posts. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_newPost() |
Creates new post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_editPost() |
Edit a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_deletePost() |
Remove a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::mw_newPost() |
Create a new post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getOptions() |
Retrieve blog options. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_setOptions() |
Update blog options. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getMediaItem() |
Retrieve a media item by ID |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getMediaLibrary() |
Retrieves a collection of media library items (or attachments) |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPostFormats() |
Retrieves a list of post formats used by the site. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPostType() |
Retrieves a post type |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPostTypes() |
Retrieves a post types |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getRevisions() |
Retrieve revisions for a specific post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_restoreRevision() |
Restore a post revision |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::blogger_getUsersBlogs() |
Retrieve blogs that user owns. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getComments() |
Retrieve comments. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deleteComment() |
Delete a comment. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editComment() |
Edit comment. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_newComment() |
Create new comment. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getCommentStatusList() |
Retrieve all of the comment status. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getCommentCount() |
Retrieve comment count. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPostStatusList() |
Retrieve post statuses. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPageStatusList() |
Retrieve page statuses. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPageTemplates() |
Retrieve page templates. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPages() |
Retrieve Pages. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_newPage() |
Create new page. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deletePage() |
Delete page. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editPage() |
Edit page. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPageList() |
Retrieve page list. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getAuthors() |
Retrieve authors list. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTags() |
Get list of all tags |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_newCategory() |
Create new category. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deleteCategory() |
Remove category. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_suggestCategories() |
Retrieve category list. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getComment() |
Retrieve comment. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPosts() |
Retrieve posts. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_newTerm() |
Create a new term. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editTerm() |
Edit a term. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deleteTerm() |
Delete a term. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTerm() |
Retrieve a term. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTerms() |
Retrieve all terms for a taxonomy. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTaxonomy() |
Retrieve a taxonomy. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getTaxonomies() |
Retrieve all taxonomies. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getUser() |
Retrieve a user. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getUsers() |
Retrieve users. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getProfile() |
Retrieve information about the requesting user. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editProfile() |
Edit user’s profile. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPage() |
Retrieve page. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_newPost() |
Create a new post for any registered post type. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_editPost() |
Edit a post for any registered post type. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_deletePost() |
Delete a post for any registered post type. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getPost() |
Retrieve a post. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getUsersBlogs() |
Retrieve the blogs of the user. |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::escape() |
Escape string or array of strings for database. |