xmlrpc_call
xmlrpc_call
Appears in: wordpress-4.0, wordpress-4.4, wordpress-4.8, wordpress-4.9, wordpress-4.9.4, wordpress-4.9.5, wordpress-4.9.6, wordpress-4.9.7, wordpress-4.9.8, wordpress-5.0, wordpress-5.0.1, wordpress-5.0.2, wordpress-5.0.3, wordpress-5.1, wordpress-5.1.1, wordpress-5.2, wordpress-5.2.1, wordpress-5.2.2, wordpress-5.2.3, wordpress-5.2.4, wordpress-5.3, wordpress-5.3.1, wordpress-5.3.2, wordpress-5.4, wordpress-5.4.1, wordpress-5.4.2, wordpress-5.5, wordpress-5.5.1, wordpress-5.5.2, wordpress-5.5.3, wordpress-5.6, wordpress-5.6.1, wordpress-5.6.2, wordpress-5.7, wordpress-5.7.1, wordpress-5.7.2, wordpress-5.8, wordpress-5.8.1, wordpress-5.8.2, wordpress-5.8.3, wordpress-5.9, wordpress-5.9.1, wordpress-5.9.2, wordpress-5.9.3, wordpress-6.0, wordpress-6.0.1, wordpress-6.0.2, wordpress-6.0.3, wordpress-6.1, wordpress-6.1.1, wordpress-6.2, wordpress-6.2.1, wordpress-6.2.2, wordpress-6.3, wordpress-6.3.1, wordpress-6.3.2, wordpress-6.4, wordpress-6.4.1, wordpress-6.4.2, wordpress-6.4.3, wordpress-6.5, wordpress-6.5.2, wordpress-6.5.3, wordpress-6.5.4, wordpress-6.5.5, wordpress-6.6, wordpress-6.6.1, wordpress-6.6.2, wordpress-6.7, wordpress-6.7.1, wordpress-6.7.2
Hook Type: action
See hook in action
Displaying hooks found in version: wordpress-6.7.2do_action('xmlrpc_call') is found 67 times:
- /wp-includes/class-wp-xmlrpc-server.php line 736732733734735736737738739740741742
* @param string
$name
The method name.
* @param
array
|string
$args
The escaped arguments passed to the method.
* @param wp_xmlrpc_server
$server
The XML-RPC server instance.
*/
do_action(
'xmlrpc_call'
,
'wp.getUsersBlogs'
,
$args
,
$this
);
$blogs
= (
array
) get_blogs_of_user(
$user
->ID );
$struct
=
array
();
$primary_blog_id
= 0;
$active_blog
= get_active_blog_for_user(
$user
->ID );
if
(
$active_blog
) {
- /wp-includes/class-wp-xmlrpc-server.php line 13471343134413451346134713481349135013511352
}
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.newPost'
,
$args
,
$this
);
unset(
$content_struct
[
'ID'
] );
return
$this
->_insert_post(
$user
,
$content_struct
);
}
- /wp-includes/class-wp-xmlrpc-server.php line 174817441745174617471748174917501751175217531754
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.editPost'
,
$args
,
$this
);
$post
= get_post(
$post_id
, ARRAY_A );
if
(
empty
(
$post
[
'ID'
] ) ) {
return
new
IXR_Error( 404, __(
'Invalid post ID.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 18311827182818291830183118321833183418351836
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.deletePost'
,
$args
,
$this
);
$post
= get_post(
$post_id
, ARRAY_A );
if
(
empty
(
$post
[
'ID'
] ) ) {
return
new
IXR_Error( 404, __(
'Invalid post ID.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 193219281929193019311932193319341935193619371938
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPost'
,
$args
,
$this
);
$post
= get_post(
$post_id
, ARRAY_A );
if
(
empty
(
$post
[
'ID'
] ) ) {
return
new
IXR_Error( 404, __(
'Invalid post ID.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 199319891990199119921993199419951996199719981999
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPosts'
,
$args
,
$this
);
$query
=
array
();
if
( isset(
$filter
[
'post_type'
] ) ) {
$post_type
= get_post_type_object(
$filter
[
'post_type'
] );
if
( ! ( (bool)
$post_type
) ) {
- /wp-includes/class-wp-xmlrpc-server.php line 209220882089209020912092209320942095209620972098
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.newTerm'
,
$args
,
$this
);
if
( ! taxonomy_exists(
$content_struct
[
'taxonomy'
] ) ) {
return
new
IXR_Error( 403, __(
'Invalid taxonomy.'
) );
}
$taxonomy
= get_taxonomy(
$content_struct
[
'taxonomy'
] );
- /wp-includes/class-wp-xmlrpc-server.php line 219721932194219521962197219821992200220122022203
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.editTerm'
,
$args
,
$this
);
if
( ! taxonomy_exists(
$content_struct
[
'taxonomy'
] ) ) {
return
new
IXR_Error( 403, __(
'Invalid taxonomy.'
) );
}
$taxonomy
= get_taxonomy(
$content_struct
[
'taxonomy'
] );
- /wp-includes/class-wp-xmlrpc-server.php line 231323092310231123122313231423152316231723182319
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.deleteTerm'
,
$args
,
$this
);
if
( ! taxonomy_exists(
$taxonomy
) ) {
return
new
IXR_Error( 403, __(
'Invalid taxonomy.'
) );
}
$taxonomy
= get_taxonomy(
$taxonomy
);
- /wp-includes/class-wp-xmlrpc-server.php line 239223882389239023912392239323942395239623972398
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getTerm'
,
$args
,
$this
);
if
( ! taxonomy_exists(
$taxonomy
) ) {
return
new
IXR_Error( 403, __(
'Invalid taxonomy.'
) );
}
$taxonomy
= get_taxonomy(
$taxonomy
);
- /wp-includes/class-wp-xmlrpc-server.php line 245724532454245524562457245824592460246124622463
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getTerms'
,
$args
,
$this
);
if
( ! taxonomy_exists(
$taxonomy
) ) {
return
new
IXR_Error( 403, __(
'Invalid taxonomy.'
) );
}
$taxonomy
= get_taxonomy(
$taxonomy
);
- /wp-includes/class-wp-xmlrpc-server.php line 256425602561256225632564256525662567256825692570
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getTaxonomy'
,
$args
,
$this
);
if
( ! taxonomy_exists(
$taxonomy
) ) {
return
new
IXR_Error( 403, __(
'Invalid taxonomy.'
) );
}
$taxonomy
= get_taxonomy(
$taxonomy
);
- /wp-includes/class-wp-xmlrpc-server.php line 26222618261926202621262226232624262526262627
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getTaxonomies'
,
$args
,
$this
);
$taxonomies
= get_taxonomies(
$filter
,
'objects'
);
// Holds all the taxonomy data.
$struct
=
array
();
- /wp-includes/class-wp-xmlrpc-server.php line 270827042705270627072708270927102711271227132714
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getUser'
,
$args
,
$this
);
if
( ! current_user_can(
'edit_user'
,
$user_id
) ) {
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit this user.'
) );
}
$user_data
= get_userdata(
$user_id
);
- /wp-includes/class-wp-xmlrpc-server.php line 277127672768276927702771277227732774277527762777
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getUsers'
,
$args
,
$this
);
if
( ! current_user_can(
'list_users'
) ) {
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to list users.'
) );
}
$query
=
array
(
'fields'
=>
'all_with_meta'
);
- /wp-includes/class-wp-xmlrpc-server.php line 285128472848284928502851285228532854285528562857
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getProfile'
,
$args
,
$this
);
if
( ! current_user_can(
'edit_user'
,
$user
->ID ) ) {
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit your profile.'
) );
}
$user_data
= get_userdata(
$user
->ID );
- /wp-includes/class-wp-xmlrpc-server.php line 290128972898289929002901290229032904290529062907
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.editProfile'
,
$args
,
$this
);
if
( ! current_user_can(
'edit_user'
,
$user
->ID ) ) {
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit your profile.'
) );
}
// Holds data of the user.
- /wp-includes/class-wp-xmlrpc-server.php line 299029862987298829892990299129922993299429952996
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit this page.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPage'
,
$args
,
$this
);
// If we found the page then format the data.
if
(
$page
->ID && (
'page'
===
$page
->post_type ) ) {
return
$this
->_prepare_page(
$page
);
}
else
{
// If the page doesn't exist, indicate that.
- /wp-includes/class-wp-xmlrpc-server.php line 303330293030303130323033303430353036303730383039
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit pages.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPages'
,
$args
,
$this
);
$pages
= get_posts(
array
(
'post_type'
=>
'page'
,
'post_status'
=>
'any'
,
'numberposts'
=>
$num_pages
,
- /wp-includes/class-wp-xmlrpc-server.php line 308830843085308630873088308930903091309230933094
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.newPage'
,
$args
,
$this
);
// Mark this as content for a page.
$args
[3][
'post_type'
] =
'page'
;
// Let mw_newPost() do all of the heavy lifting.
return
$this
->mw_newPost(
$args
);
- /wp-includes/class-wp-xmlrpc-server.php line 312531213122312331243125312631273128312931303131
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.deletePage'
,
$args
,
$this
);
/*
* Get the current page based on the 'page_id' and
* make sure it is a page and not a post.
*/
$actual_page
= get_post(
$page_id
, ARRAY_A );
- /wp-includes/class-wp-xmlrpc-server.php line 319431903191319231933194319531963197319831993200
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.editPage'
,
$args
,
$this
);
// Get the page data and make sure it is a page.
$actual_page
= get_post(
$page_id
, ARRAY_A );
if
( !
$actual_page
|| (
'page'
!==
$actual_page
[
'post_type'
] ) ) {
return
new
IXR_Error( 404, __(
'Sorry, no such page.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 325732533254325532563257325832593260326132623263
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit pages.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPageList'
,
$args
,
$this
);
// Get list of page IDs and titles.
$page_list
=
$wpdb
->get_results(
"
SELECT ID page_id,
post_title page_title,
- /wp-includes/class-wp-xmlrpc-server.php line 331833143315331633173318331933203321332233233324
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit posts.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getAuthors'
,
$args
,
$this
);
$authors
=
array
();
foreach
( get_users(
array
(
'fields'
=>
array
(
'ID'
,
'user_login'
,
'display_name'
) ) )
as
$user
) {
$authors
[] =
array
(
'user_id'
=>
$user
->ID,
'user_login'
=>
$user
->user_login,
- /wp-includes/class-wp-xmlrpc-server.php line 336233583359336033613362336333643365336633673368
return
new
IXR_Error( 401, __(
'Sorry, you must be able to edit posts on this site in order to view tags.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getKeywords'
,
$args
,
$this
);
$tags
=
array
();
$all_tags
= get_tags();
if
(
$all_tags
) {
foreach
( (
array
)
$all_tags
as
$tag
) {
- /wp-includes/class-wp-xmlrpc-server.php line 34123408340934103411341234133414341534163417
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.newCategory'
,
$args
,
$this
);
// Make sure the user is allowed to add a category.
if
( ! current_user_can(
'manage_categories'
) ) {
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to add a category.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 349934953496349734983499350035013502350335043505
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.deleteCategory'
,
$args
,
$this
);
if
( ! current_user_can(
'delete_term'
,
$category_id
) ) {
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to delete this category.'
) );
}
$status
= wp_delete_term(
$category_id
,
'category'
);
- /wp-includes/class-wp-xmlrpc-server.php line 355635523553355435553556355735583559356035613562
return
new
IXR_Error( 401, __(
'Sorry, you must be able to edit posts on this site in order to view categories.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.suggestCategories'
,
$args
,
$this
);
$category_suggestions
=
array
();
$args
=
array
(
'get'
=>
'all'
,
'number'
=>
$max_results
,
'name__like'
=>
$category
,
- /wp-includes/class-wp-xmlrpc-server.php line 36023598359936003601360236033604360536063607
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getComment'
,
$args
,
$this
);
$comment
= get_comment(
$comment_id
);
if
( !
$comment
) {
return
new
IXR_Error( 404, __(
'Invalid comment ID.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 365836543655365636573658365936603661366236633664
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getComments'
,
$args
,
$this
);
if
( isset(
$struct
[
'status'
] ) ) {
$status
=
$struct
[
'status'
];
}
else
{
$status
=
''
;
}
- /wp-includes/class-wp-xmlrpc-server.php line 375337493750375137523753375437553756375737583759
return
new
IXR_Error( 403, __(
'Sorry, you are not allowed to delete this comment.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.deleteComment'
,
$args
,
$this
);
$status
= wp_delete_comment(
$comment_id
);
if
(
$status
) {
/**
* Fires after a comment has been successfully deleted via XML-RPC.
- /wp-includes/class-wp-xmlrpc-server.php line 382138173818381938203821382238233824382538263827
return
new
IXR_Error( 403, __(
'Sorry, you are not allowed to moderate or edit this comment.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.editComment'
,
$args
,
$this
);
$comment
=
array
(
'comment_ID'
=>
$comment_id
,
);
if
( isset(
$content_struct
[
'status'
] ) ) {
$statuses
= get_comment_statuses();
- /wp-includes/class-wp-xmlrpc-server.php line 40144010401140124013401440154016401740184019
return
new
IXR_Error( 403, __(
'Comment is required.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.newComment'
,
$args
,
$this
);
$comment_id
= wp_new_comment(
$comment
, true );
if
( is_wp_error(
$comment_id
) ) {
return
new
IXR_Error( 403,
$comment_id
->get_error_message() );
}
- /wp-includes/class-wp-xmlrpc-server.php line 406840644065406640674068406940704071407240734074
return
new
IXR_Error( 403, __(
'Sorry, you are not allowed to access details about this site.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getCommentStatusList'
,
$args
,
$this
);
return
get_comment_statuses();
}
/**
* Retrieves comment counts.
- /wp-includes/class-wp-xmlrpc-server.php line 411041064107410841094110411141124113411441154116
return
new
IXR_Error( 403, __(
'Sorry, you are not allowed to access details of this post.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getCommentCount'
,
$args
,
$this
);
$count
= wp_count_comments(
$post_id
);
return
array
(
'approved'
=>
$count
->approved,
'awaiting_moderation'
=>
$count
->moderated,
- /wp-includes/class-wp-xmlrpc-server.php line 415241484149415041514152415341544155415641574158
return
new
IXR_Error( 403, __(
'Sorry, you are not allowed to access details about this site.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPostStatusList'
,
$args
,
$this
);
return
get_post_statuses();
}
/**
* Retrieves page statuses.
- /wp-includes/class-wp-xmlrpc-server.php line 418741834184418541864187418841894190419141924193
return
new
IXR_Error( 403, __(
'Sorry, you are not allowed to access details about this site.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPageStatusList'
,
$args
,
$this
);
return
get_page_statuses();
}
/**
* Retrieves page templates.
- /wp-includes/class-wp-xmlrpc-server.php line 43804376437743784379438043814382438343844385
return
new
IXR_Error( 403, __(
'Sorry, you are not allowed to upload files.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getMediaItem'
,
$args
,
$this
);
$attachment
= get_post(
$attachment_id
);
if
( !
$attachment
||
'attachment'
!==
$attachment
->post_type ) {
return
new
IXR_Error( 404, __(
'Invalid attachment ID.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 44364432443344344435443644374438443944404441
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to upload files.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getMediaLibrary'
,
$args
,
$this
);
$parent_id
= ( isset(
$struct
[
'parent_id'
] ) ) ? absint(
$struct
[
'parent_id'
] ) :
''
;
$mime_type
= ( isset(
$struct
[
'mime_type'
] ) ) ?
$struct
[
'mime_type'
] :
''
;
$offset
= ( isset(
$struct
[
'offset'
] ) ) ? absint(
$struct
[
'offset'
] ) : 0;
$number
= ( isset(
$struct
[
'number'
] ) ) ? absint(
$struct
[
'number'
] ) : -1;
- /wp-includes/class-wp-xmlrpc-server.php line 449244884489449044914492449344944495449644974498
return
new
IXR_Error( 403, __(
'Sorry, you are not allowed to access details about this site.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPostFormats'
,
$args
,
$this
);
$formats
= get_post_format_strings();
// Find out if they want a list of currently supports formats.
if
( isset(
$args
[3] ) &&
is_array
(
$args
[3] ) ) {
if
(
$args
[3][
'show-supported'
] ) {
- /wp-includes/class-wp-xmlrpc-server.php line 457345694570457145724573457445754576457745784579
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPostType'
,
$args
,
$this
);
if
( ! post_type_exists(
$post_type_name
) ) {
return
new
IXR_Error( 403, __(
'Invalid post type.'
) );
}
$post_type
= get_post_type_object(
$post_type_name
);
- /wp-includes/class-wp-xmlrpc-server.php line 463046264627462846294630463146324633463446354636
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getPostTypes'
,
$args
,
$this
);
$post_types
= get_post_types(
$filter
,
'objects'
);
$struct
=
array
();
foreach
(
$post_types
as
$post_type
) {
- /wp-includes/class-wp-xmlrpc-server.php line 47014697469846994700470147024703470447054706
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.getRevisions'
,
$args
,
$this
);
$post
= get_post(
$post_id
);
if
( !
$post
) {
return
new
IXR_Error( 404, __(
'Invalid post ID.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 47754771477247734774477547764777477847794780
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'wp.restoreRevision'
,
$args
,
$this
);
$revision
= wp_get_post_revision(
$revision_id
);
if
( !
$revision
) {
return
new
IXR_Error( 404, __(
'Invalid post ID.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 484648424843484448454846484748484849485048514852
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'blogger.getUsersBlogs'
,
$args
,
$this
);
$is_admin
= current_user_can(
'manage_options'
);
$struct
=
array
(
'isAdmin'
=>
$is_admin
,
'url'
=> get_option(
'home'
) .
'/'
,
- /wp-includes/class-wp-xmlrpc-server.php line 493049264927492849294930493149324933493449354936
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to access user data on this site.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'blogger.getUserInfo'
,
$args
,
$this
);
$struct
=
array
(
'nickname'
=>
$user
->nickname,
'userid'
=>
$user
->ID,
'url'
=>
$user
->user_url,
'lastname'
=>
$user
->last_name,
- /wp-includes/class-wp-xmlrpc-server.php line 498049764977497849794980498149824983498449854986
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit this post.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'blogger.getPost'
,
$args
,
$this
);
$categories
= implode(
','
, wp_get_post_categories(
$post_id
) );
$content
=
'<title>'
. wp_unslash(
$post_data
[
'post_title'
] ) .
'</title>'
;
$content
.=
'<category>'
.
$categories
.
'</category>'
;
$content
.= wp_unslash(
$post_data
[
'post_content'
] );
- /wp-includes/class-wp-xmlrpc-server.php line 503750335034503550365037503850395040504150425043
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit posts.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'blogger.getRecentPosts'
,
$args
,
$this
);
$posts_list
= wp_get_recent_posts(
$query
);
if
( !
$posts_list
) {
$this
->error =
new
IXR_Error( 500, __(
'Either there are no posts, or something went wrong.'
) );
return
$this
->error;
- /wp-includes/class-wp-xmlrpc-server.php line 51275123512451255126512751285129513051315132
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'blogger.newPost'
,
$args
,
$this
);
$cap
= (
$publish
) ?
'publish_posts'
:
'edit_posts'
;
if
( ! current_user_can( get_post_type_object(
'post'
)->cap->create_posts ) || ! current_user_can(
$cap
) ) {
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to post on this site.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 520452005201520252035204520552065207520852095210
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'blogger.editPost'
,
$args
,
$this
);
$actual_post
= get_post(
$post_id
, ARRAY_A );
if
( !
$actual_post
||
'post'
!==
$actual_post
[
'post_type'
] ) {
return
new
IXR_Error( 404, __(
'Sorry, no such post.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 527852745275527652775278527952805281528252835284
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'blogger.deletePost'
,
$args
,
$this
);
$actual_post
= get_post(
$post_id
, ARRAY_A );
if
( !
$actual_post
||
'post'
!==
$actual_post
[
'post_type'
] ) {
return
new
IXR_Error( 404, __(
'Sorry, no such post.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 536653625363536453655366536753685369537053715372
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'metaWeblog.newPost'
,
$args
,
$this
);
$page_template
=
''
;
if
( !
empty
(
$content_struct
[
'post_type'
] ) ) {
if
(
'page'
===
$content_struct
[
'post_type'
] ) {
if
(
$publish
) {
$cap
=
'publish_pages'
;
- /wp-includes/class-wp-xmlrpc-server.php line 574357395740574157425743574457455746574757485749
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'metaWeblog.editPost'
,
$args
,
$this
);
$postdata
= get_post(
$post_id
, ARRAY_A );
/*
* If there is no post data
for
the give post ID, stop now
and
return
an error.
* Otherwise a
new
post will be created (which was the old behavior).
- /wp-includes/class-wp-xmlrpc-server.php line 608060766077607860796080608160826083608460856086
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit this post.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'metaWeblog.getPost'
,
$args
,
$this
);
if
(
''
!==
$postdata
[
'post_date'
] ) {
$post_date
=
$this
->_convert_date(
$postdata
[
'post_date'
] );
$post_date_gmt
=
$this
->_convert_date_gmt(
$postdata
[
'post_date_gmt'
],
$postdata
[
'post_date'
] );
$post_modified
=
$this
->_convert_date(
$postdata
[
'post_modified'
] );
$post_modified_gmt
=
$this
->_convert_date_gmt(
$postdata
[
'post_modified_gmt'
],
$postdata
[
'post_modified'
] );
- /wp-includes/class-wp-xmlrpc-server.php line 622162176218621962206221622262236224622562266227
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit posts.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'metaWeblog.getRecentPosts'
,
$args
,
$this
);
$posts_list
= wp_get_recent_posts(
$query
);
if
( !
$posts_list
) {
return
array
();
}
- /wp-includes/class-wp-xmlrpc-server.php line 634263386339634063416342634363446345634663476348
return
new
IXR_Error( 401, __(
'Sorry, you must be able to edit posts on this site in order to view categories.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'metaWeblog.getCategories'
,
$args
,
$this
);
$categories_struct
=
array
();
$cats
= get_categories(
array
(
'get'
=>
'all'
) );
if
(
$cats
) {
foreach
(
$cats
as
$cat
) {
- /wp-includes/class-wp-xmlrpc-server.php line 63996395639663976398639964006401640264036404
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'metaWeblog.newMediaObject'
,
$args
,
$this
);
if
( ! current_user_can(
'upload_files'
) ) {
$this
->error =
new
IXR_Error( 401, __(
'Sorry, you are not allowed to upload files.'
) );
return
$this
->error;
}
- /wp-includes/class-wp-xmlrpc-server.php line 651865146515651665176518651965206521652265236524
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'mt.getRecentPostTitles'
,
$args
,
$this
);
$posts_list
= wp_get_recent_posts(
$query
);
if
( !
$posts_list
) {
$this
->error =
new
IXR_Error( 500, __(
'Either there are no posts, or something went wrong.'
) );
return
$this
->error;
- /wp-includes/class-wp-xmlrpc-server.php line 658065766577657865796580658165826583658465856586
return
new
IXR_Error( 401, __(
'Sorry, you must be able to edit posts on this site in order to view categories.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'mt.getCategoryList'
,
$args
,
$this
);
$categories_struct
=
array
();
$cats
= get_categories(
array
(
'hide_empty'
=> 0,
- /wp-includes/class-wp-xmlrpc-server.php line 663866346635663666376638663966406641664266436644
return
new
IXR_Error( 401, __(
'Sorry, you are not allowed to edit this post.'
) );
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'mt.getPostCategories'
,
$args
,
$this
);
$categories
=
array
();
$catids
= wp_get_post_categories( (int)
$post_id
);
// First listed category will be the primary category.
$isPrimary
= true;
foreach
(
$catids
as
$catid
) {
- /wp-includes/class-wp-xmlrpc-server.php line 668566816682668366846685668666876688668966906691
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'mt.setPostCategories'
,
$args
,
$this
);
if
( ! get_post(
$post_id
) ) {
return
new
IXR_Error( 404, __(
'Invalid post ID.'
) );
}
if
( ! current_user_can(
'edit_post'
,
$post_id
) ) {
- /wp-includes/class-wp-xmlrpc-server.php line 671467106711671267136714671567166717671867196720
* @
return
array
*/
public
function
mt_supportedMethods() {
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'mt.supportedMethods'
,
array
(),
$this
);
return
array_keys
(
$this
->methods );
}
/**
* Retrieves an
empty
array
because we don't support per-post text filters.
- /wp-includes/class-wp-xmlrpc-server.php line 672667226723672467256726672767286729673067316732
* @since 1.5.0
*/
public
function
mt_supportedTextFilters() {
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'mt.supportedTextFilters'
,
array
(),
$this
);
/**
* Filters the MoveableType text filters list
for
XML-RPC.
*
* @since 2.2.0
*
- /wp-includes/class-wp-xmlrpc-server.php line 675267486749675067516752675367546755675667576758
public
function
mt_getTrackbackPings(
$post_id
) {
global
$wpdb
;
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'mt.getTrackbackPings'
,
$post_id
,
$this
);
$actual_post
= get_post(
$post_id
, ARRAY_A );
if
( !
$actual_post
) {
return
new
IXR_Error( 404, __(
'Sorry, no such post.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 68096805680668076808680968106811681268136814
return
$this
->error;
}
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'mt.publishPost'
,
$args
,
$this
);
$postdata
= get_post(
$post_id
, ARRAY_A );
if
( !
$postdata
) {
return
new
IXR_Error( 404, __(
'Invalid post ID.'
) );
}
- /wp-includes/class-wp-xmlrpc-server.php line 685368496850685168526853685468556856685768586859
public
function
pingback_ping(
$args
) {
global
$wpdb
;
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'pingback.ping'
,
$args
,
$this
);
$this
->escape(
$args
);
$pagelinkedfrom
=
str_replace
(
'&'
,
'&'
,
$args
[0] );
$pagelinkedto
=
str_replace
(
'&'
,
'&'
,
$args
[1] );
$pagelinkedto
=
str_replace
(
'&'
,
'&'
,
$pagelinkedto
);
- /wp-includes/class-wp-xmlrpc-server.php line 710971057106710771087109711071117112711371147115
public
function
pingback_extensions_getPingbacks(
$url
) {
global
$wpdb
;
/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
do_action(
'xmlrpc_call'
,
'pingback.extensions.getPingbacks'
,
$url
,
$this
);
$url
=
$this
->escape(
$url
);
$post_id
= url_to_postid(
$url
);
if
( !
$post_id
) {
// We aren't sure that the resource is available and/or pingback enabled.