xmlrpc_call

xmlrpc_call

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('xmlrpc_call') is found 67 times:

  • /wp-includes/class-wp-xmlrpc-server.php line 736
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    * @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 1347
    1343
    1344
    1345
    1346
    1347
    1348
    1349
    1350
    1351
    1352
            }
        }
     
        /** 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 1748
    1744
    1745
    1746
    1747
    1748
    1749
    1750
    1751
    1752
    1753
    1754
        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 1831
    1827
    1828
    1829
    1830
    1831
    1832
    1833
    1834
    1835
    1836
        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 1932
    1928
    1929
    1930
    1931
    1932
    1933
    1934
    1935
    1936
    1937
    1938
        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 1993
    1989
    1990
    1991
    1992
    1993
    1994
    1995
    1996
    1997
    1998
    1999
        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 2092
    2088
    2089
    2090
    2091
    2092
    2093
    2094
    2095
    2096
    2097
    2098
        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 2197
    2193
    2194
    2195
    2196
    2197
    2198
    2199
    2200
    2201
    2202
    2203
        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 2313
    2309
    2310
    2311
    2312
    2313
    2314
    2315
    2316
    2317
    2318
    2319
        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 2392
    2388
    2389
    2390
    2391
    2392
    2393
    2394
    2395
    2396
    2397
    2398
        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 2457
    2453
    2454
    2455
    2456
    2457
    2458
    2459
    2460
    2461
    2462
    2463
        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 2564
    2560
    2561
    2562
    2563
    2564
    2565
    2566
    2567
    2568
    2569
    2570
        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 2622
    2618
    2619
    2620
    2621
    2622
    2623
    2624
    2625
    2626
    2627
        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 2708
    2704
    2705
    2706
    2707
    2708
    2709
    2710
    2711
    2712
    2713
    2714
        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 2771
    2767
    2768
    2769
    2770
    2771
    2772
    2773
    2774
    2775
    2776
    2777
        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 2851
    2847
    2848
    2849
    2850
    2851
    2852
    2853
    2854
    2855
    2856
    2857
        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 2901
    2897
    2898
    2899
    2900
    2901
    2902
    2903
    2904
    2905
    2906
    2907
        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 2990
    2986
    2987
    2988
    2989
    2990
    2991
    2992
    2993
    2994
    2995
    2996
        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 3033
    3029
    3030
    3031
    3032
    3033
    3034
    3035
    3036
    3037
    3038
    3039
        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 3088
    3084
    3085
    3086
    3087
    3088
    3089
    3090
    3091
    3092
    3093
    3094
        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 3125
    3121
    3122
    3123
    3124
    3125
    3126
    3127
    3128
    3129
    3130
    3131
        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 3194
    3190
    3191
    3192
    3193
    3194
    3195
    3196
    3197
    3198
    3199
    3200
        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 3257
    3253
    3254
    3255
    3256
    3257
    3258
    3259
    3260
    3261
    3262
    3263
        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 3318
    3314
    3315
    3316
    3317
    3318
    3319
    3320
    3321
    3322
    3323
    3324
        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 3362
    3358
    3359
    3360
    3361
    3362
    3363
    3364
    3365
    3366
    3367
    3368
        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 3412
    3408
    3409
    3410
    3411
    3412
    3413
    3414
    3415
    3416
    3417
        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 3499
    3495
    3496
    3497
    3498
    3499
    3500
    3501
    3502
    3503
    3504
    3505
        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 3556
    3552
    3553
    3554
    3555
    3556
    3557
    3558
    3559
    3560
    3561
    3562
        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 3602
    3598
    3599
    3600
    3601
    3602
    3603
    3604
    3605
    3606
    3607
        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 3658
    3654
    3655
    3656
    3657
    3658
    3659
    3660
    3661
    3662
    3663
    3664
        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 3753
    3749
    3750
    3751
    3752
    3753
    3754
    3755
    3756
    3757
    3758
    3759
        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 3821
    3817
    3818
    3819
    3820
    3821
    3822
    3823
    3824
    3825
    3826
    3827
        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 4014
    4010
    4011
    4012
    4013
    4014
    4015
    4016
    4017
    4018
    4019
        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 4068
    4064
    4065
    4066
    4067
    4068
    4069
    4070
    4071
    4072
    4073
    4074
            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 4110
    4106
    4107
    4108
    4109
    4110
    4111
    4112
    4113
    4114
    4115
    4116
        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 4152
    4148
    4149
    4150
    4151
    4152
    4153
    4154
    4155
    4156
    4157
    4158
            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 4187
    4183
    4184
    4185
    4186
    4187
    4188
    4189
    4190
    4191
    4192
    4193
            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 4380
    4376
    4377
    4378
    4379
    4380
    4381
    4382
    4383
    4384
    4385
        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 4436
    4432
    4433
    4434
    4435
    4436
    4437
    4438
    4439
    4440
    4441
        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 4492
    4488
    4489
    4490
    4491
    4492
    4493
    4494
    4495
    4496
    4497
    4498
        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 4573
    4569
    4570
    4571
    4572
    4573
    4574
    4575
    4576
    4577
    4578
    4579
        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 4630
    4626
    4627
    4628
    4629
    4630
    4631
    4632
    4633
    4634
    4635
    4636
        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 4701
    4697
    4698
    4699
    4700
    4701
    4702
    4703
    4704
    4705
    4706
        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 4775
    4771
    4772
    4773
    4774
    4775
    4776
    4777
    4778
    4779
    4780
        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 4846
    4842
    4843
    4844
    4845
    4846
    4847
    4848
    4849
    4850
    4851
    4852
        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 4930
    4926
    4927
    4928
    4929
    4930
    4931
    4932
    4933
    4934
    4935
    4936
        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 4980
    4976
    4977
    4978
    4979
    4980
    4981
    4982
    4983
    4984
    4985
    4986
        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 5037
    5033
    5034
    5035
    5036
    5037
    5038
    5039
    5040
    5041
    5042
    5043
        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 5127
    5123
    5124
    5125
    5126
    5127
    5128
    5129
    5130
    5131
    5132
        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 5204
    5200
    5201
    5202
    5203
    5204
    5205
    5206
    5207
    5208
    5209
    5210
        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 5278
    5274
    5275
    5276
    5277
    5278
    5279
    5280
    5281
    5282
    5283
    5284
        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 5366
    5362
    5363
    5364
    5365
    5366
    5367
    5368
    5369
    5370
    5371
    5372
        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 5743
    5739
    5740
    5741
    5742
    5743
    5744
    5745
    5746
    5747
    5748
    5749
        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 6080
    6076
    6077
    6078
    6079
    6080
    6081
    6082
    6083
    6084
    6085
    6086
        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 6221
    6217
    6218
    6219
    6220
    6221
    6222
    6223
    6224
    6225
    6226
    6227
        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 6342
    6338
    6339
    6340
    6341
    6342
    6343
    6344
    6345
    6346
    6347
    6348
        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 6399
    6395
    6396
    6397
    6398
    6399
    6400
    6401
    6402
    6403
    6404
        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 6518
    6514
    6515
    6516
    6517
    6518
    6519
    6520
    6521
    6522
    6523
    6524
        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 6580
    6576
    6577
    6578
    6579
    6580
    6581
    6582
    6583
    6584
    6585
    6586
        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 6638
    6634
    6635
    6636
    6637
    6638
    6639
    6640
    6641
    6642
    6643
    6644
        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 6685
    6681
    6682
    6683
    6684
    6685
    6686
    6687
    6688
    6689
    6690
    6691
        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 6714
    6710
    6711
    6712
    6713
    6714
    6715
    6716
    6717
    6718
    6719
    6720
    * @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 6726
    6722
    6723
    6724
    6725
    6726
    6727
    6728
    6729
    6730
    6731
    6732
    * @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 6752
    6748
    6749
    6750
    6751
    6752
    6753
    6754
    6755
    6756
    6757
    6758
    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 6809
    6805
    6806
    6807
    6808
    6809
    6810
    6811
    6812
    6813
    6814
        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 6853
    6849
    6850
    6851
    6852
    6853
    6854
    6855
    6856
    6857
    6858
    6859
    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( '&amp;', '&', $args[0] );
        $pagelinkedto   = str_replace( '&amp;', '&', $args[1] );
        $pagelinkedto   = str_replace( '&', '&amp;', $pagelinkedto );
  • /wp-includes/class-wp-xmlrpc-server.php line 7109
    7105
    7106
    7107
    7108
    7109
    7110
    7111
    7112
    7113
    7114
    7115
    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.

See this hook used in plugins: