Escapes string or array of strings for database.
Parameters
$data
string|arrayrequired- Escape single string or array of strings.
Return
string|void Returns with string is passed, alters by-reference when array is passed.Source
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 );
}
}
}
Related
Uses | Description |
---|---|
wp_slash()wp-includes/formatting.php | Adds slashes to a string or recursively adds slashes to strings within an array. |
wp_xmlrpc_server::escape()wp-includes/class-wp-xmlrpc-server.php | Escapes string or array of strings for database. |
Used by | Description |
---|---|
wp_xmlrpc_server::mt_getPostCategories()wp-includes/class-wp-xmlrpc-server.php | Retrieves post categories. |
wp_xmlrpc_server::mt_setPostCategories()wp-includes/class-wp-xmlrpc-server.php | Sets categories for a post. |
wp_xmlrpc_server::mt_publishPost()wp-includes/class-wp-xmlrpc-server.php | Sets a post’s publish status to ‘publish’. |
wp_xmlrpc_server::pingback_ping()wp-includes/class-wp-xmlrpc-server.php | Retrieves a pingback and registers it. |
wp_xmlrpc_server::pingback_extensions_getPingbacks()wp-includes/class-wp-xmlrpc-server.php | Retrieves an array of URLs that pingbacked the given URL. |
wp_xmlrpc_server::mw_editPost()wp-includes/class-wp-xmlrpc-server.php | Edits a post. |
wp_xmlrpc_server::mw_getPost()wp-includes/class-wp-xmlrpc-server.php | Retrieves a post. |
wp_xmlrpc_server::mw_getRecentPosts()wp-includes/class-wp-xmlrpc-server.php | Retrieves list of recent posts. |
wp_xmlrpc_server::mw_getCategories()wp-includes/class-wp-xmlrpc-server.php | Retrieves the list of categories on a given blog. |
wp_xmlrpc_server::mw_newMediaObject()wp-includes/class-wp-xmlrpc-server.php | Uploads a file, following your settings. |
wp_xmlrpc_server::mt_getRecentPostTitles()wp-includes/class-wp-xmlrpc-server.php | Retrieves the post titles of recent posts. |
wp_xmlrpc_server::mt_getCategoryList()wp-includes/class-wp-xmlrpc-server.php | Retrieves the list of all categories on a blog. |
wp_xmlrpc_server::blogger_getUserInfo()wp-includes/class-wp-xmlrpc-server.php | Retrieves user’s data. |
wp_xmlrpc_server::blogger_getPost()wp-includes/class-wp-xmlrpc-server.php | Retrieves a post. |
wp_xmlrpc_server::blogger_getRecentPosts()wp-includes/class-wp-xmlrpc-server.php | Retrieves the list of recent posts. |
wp_xmlrpc_server::blogger_newPost()wp-includes/class-wp-xmlrpc-server.php | Creates a new post. |
wp_xmlrpc_server::blogger_editPost()wp-includes/class-wp-xmlrpc-server.php | Edits a post. |
wp_xmlrpc_server::blogger_deletePost()wp-includes/class-wp-xmlrpc-server.php | Deletes a post. |
wp_xmlrpc_server::mw_newPost()wp-includes/class-wp-xmlrpc-server.php | Creates a new post. |
wp_xmlrpc_server::wp_getOptions()wp-includes/class-wp-xmlrpc-server.php | Retrieves blog options. |
wp_xmlrpc_server::wp_setOptions()wp-includes/class-wp-xmlrpc-server.php | Updates blog options. |
wp_xmlrpc_server::wp_getMediaItem()wp-includes/class-wp-xmlrpc-server.php | Retrieves a media item by ID. |
wp_xmlrpc_server::wp_getMediaLibrary()wp-includes/class-wp-xmlrpc-server.php | Retrieves a collection of media library items (or attachments). |
wp_xmlrpc_server::wp_getPostFormats()wp-includes/class-wp-xmlrpc-server.php | Retrieves a list of post formats used by the site. |
wp_xmlrpc_server::wp_getPostType()wp-includes/class-wp-xmlrpc-server.php | Retrieves a post type. |
wp_xmlrpc_server::wp_getPostTypes()wp-includes/class-wp-xmlrpc-server.php | Retrieves post types. |
wp_xmlrpc_server::wp_getRevisions()wp-includes/class-wp-xmlrpc-server.php | Retrieves revisions for a specific post. |
wp_xmlrpc_server::wp_restoreRevision()wp-includes/class-wp-xmlrpc-server.php | Restores a post revision. |
wp_xmlrpc_server::blogger_getUsersBlogs()wp-includes/class-wp-xmlrpc-server.php | Retrieves blogs that user owns. |
wp_xmlrpc_server::wp_getComments()wp-includes/class-wp-xmlrpc-server.php | Retrieves comments. |
wp_xmlrpc_server::wp_deleteComment()wp-includes/class-wp-xmlrpc-server.php | Deletes a comment. |
wp_xmlrpc_server::wp_editComment()wp-includes/class-wp-xmlrpc-server.php | Edits a comment. |
wp_xmlrpc_server::wp_newComment()wp-includes/class-wp-xmlrpc-server.php | Creates a new comment. |
wp_xmlrpc_server::wp_getCommentStatusList()wp-includes/class-wp-xmlrpc-server.php | Retrieves all of the comment status. |
wp_xmlrpc_server::wp_getCommentCount()wp-includes/class-wp-xmlrpc-server.php | Retrieves comment counts. |
wp_xmlrpc_server::wp_getPostStatusList()wp-includes/class-wp-xmlrpc-server.php | Retrieves post statuses. |
wp_xmlrpc_server::wp_getPageStatusList()wp-includes/class-wp-xmlrpc-server.php | Retrieves page statuses. |
wp_xmlrpc_server::wp_getPageTemplates()wp-includes/class-wp-xmlrpc-server.php | Retrieves page templates. |
wp_xmlrpc_server::wp_getPages()wp-includes/class-wp-xmlrpc-server.php | Retrieves Pages. |
wp_xmlrpc_server::wp_newPage()wp-includes/class-wp-xmlrpc-server.php | Creates a new page. |
wp_xmlrpc_server::wp_deletePage()wp-includes/class-wp-xmlrpc-server.php | Deletes a page. |
wp_xmlrpc_server::wp_editPage()wp-includes/class-wp-xmlrpc-server.php | Edits a page. |
wp_xmlrpc_server::wp_getPageList()wp-includes/class-wp-xmlrpc-server.php | Retrieves page list. |
wp_xmlrpc_server::wp_getAuthors()wp-includes/class-wp-xmlrpc-server.php | Retrieves authors list. |
wp_xmlrpc_server::wp_getTags()wp-includes/class-wp-xmlrpc-server.php | Gets the list of all tags. |
wp_xmlrpc_server::wp_newCategory()wp-includes/class-wp-xmlrpc-server.php | Creates a new category. |
wp_xmlrpc_server::wp_deleteCategory()wp-includes/class-wp-xmlrpc-server.php | Deletes a category. |
wp_xmlrpc_server::wp_suggestCategories()wp-includes/class-wp-xmlrpc-server.php | Retrieves category list. |
wp_xmlrpc_server::wp_getComment()wp-includes/class-wp-xmlrpc-server.php | Retrieves a comment. |
wp_xmlrpc_server::wp_getPosts()wp-includes/class-wp-xmlrpc-server.php | Retrieves posts. |
wp_xmlrpc_server::wp_newTerm()wp-includes/class-wp-xmlrpc-server.php | Creates a new term. |
wp_xmlrpc_server::wp_editTerm()wp-includes/class-wp-xmlrpc-server.php | Edits a term. |
wp_xmlrpc_server::wp_deleteTerm()wp-includes/class-wp-xmlrpc-server.php | Deletes a term. |
wp_xmlrpc_server::wp_getTerm()wp-includes/class-wp-xmlrpc-server.php | Retrieves a term. |
wp_xmlrpc_server::wp_getTerms()wp-includes/class-wp-xmlrpc-server.php | Retrieves all terms for a taxonomy. |
wp_xmlrpc_server::wp_getTaxonomy()wp-includes/class-wp-xmlrpc-server.php | Retrieves a taxonomy. |
wp_xmlrpc_server::wp_getTaxonomies()wp-includes/class-wp-xmlrpc-server.php | Retrieves all taxonomies. |
wp_xmlrpc_server::wp_getUser()wp-includes/class-wp-xmlrpc-server.php | Retrieves a user. |
wp_xmlrpc_server::wp_getUsers()wp-includes/class-wp-xmlrpc-server.php | Retrieves users. |
wp_xmlrpc_server::wp_getProfile()wp-includes/class-wp-xmlrpc-server.php | Retrieves information about the requesting user. |
wp_xmlrpc_server::wp_editProfile()wp-includes/class-wp-xmlrpc-server.php | Edits user’s profile. |
wp_xmlrpc_server::wp_getPage()wp-includes/class-wp-xmlrpc-server.php | Retrieves a page. |
wp_xmlrpc_server::wp_newPost()wp-includes/class-wp-xmlrpc-server.php | Creates a new post for any registered post type. |
wp_xmlrpc_server::wp_editPost()wp-includes/class-wp-xmlrpc-server.php | Edits a post for any registered post type. |
wp_xmlrpc_server::wp_deletePost()wp-includes/class-wp-xmlrpc-server.php | Deletes a post for any registered post type. |
wp_xmlrpc_server::wp_getPost()wp-includes/class-wp-xmlrpc-server.php | Retrieves a post. |
wp_xmlrpc_server::wp_getUsersBlogs()wp-includes/class-wp-xmlrpc-server.php | Retrieves the blogs of the user. |
wp_xmlrpc_server::escape()wp-includes/class-wp-xmlrpc-server.php | Escapes string or array of strings for database. |
Changelog
Version | Description |
---|---|
1.5.2 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.