Changeset 50353
- Timestamp:
- 02/16/2021 05:01:46 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r49927 r50353 682 682 * 683 683 * @since 2.5.0 684 * @since 5.7.0 Added the `$args` and `$server` parameters. 684 685 * 685 * @param string $name The method name. 686 * @param string $name The method name. 687 * @param array|string $args The escaped arguments passed to the method. 688 * @param wp_xmlrpc_server $server The XML-RPC server instance. 686 689 */ 687 do_action( 'xmlrpc_call', 'wp.getUsersBlogs' );690 do_action( 'xmlrpc_call', 'wp.getUsersBlogs', $args, $this ); 688 691 689 692 $blogs = (array) get_blogs_of_user( $user->ID ); … … 1295 1298 1296 1299 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 1297 do_action( 'xmlrpc_call', 'wp.newPost' );1300 do_action( 'xmlrpc_call', 'wp.newPost', $args, $this ); 1298 1301 1299 1302 unset( $content_struct['ID'] ); … … 1688 1691 1689 1692 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 1690 do_action( 'xmlrpc_call', 'wp.editPost' );1693 do_action( 'xmlrpc_call', 'wp.editPost', $args, $this ); 1691 1694 1692 1695 $post = get_post( $post_id, ARRAY_A ); … … 1771 1774 1772 1775 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 1773 do_action( 'xmlrpc_call', 'wp.deletePost' );1776 do_action( 'xmlrpc_call', 'wp.deletePost', $args, $this ); 1774 1777 1775 1778 $post = get_post( $post_id, ARRAY_A ); … … 1871 1874 1872 1875 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 1873 do_action( 'xmlrpc_call', 'wp.getPost' );1876 do_action( 'xmlrpc_call', 'wp.getPost', $args, $this ); 1874 1877 1875 1878 $post = get_post( $post_id, ARRAY_A ); … … 1932 1935 1933 1936 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 1934 do_action( 'xmlrpc_call', 'wp.getPosts' );1937 do_action( 'xmlrpc_call', 'wp.getPosts', $args, $this ); 1935 1938 1936 1939 $query = array(); … … 2031 2034 2032 2035 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2033 do_action( 'xmlrpc_call', 'wp.newTerm' );2036 do_action( 'xmlrpc_call', 'wp.newTerm', $args, $this ); 2034 2037 2035 2038 if ( ! taxonomy_exists( $content_struct['taxonomy'] ) ) { … … 2136 2139 2137 2140 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2138 do_action( 'xmlrpc_call', 'wp.editTerm' );2141 do_action( 'xmlrpc_call', 'wp.editTerm', $args, $this ); 2139 2142 2140 2143 if ( ! taxonomy_exists( $content_struct['taxonomy'] ) ) { … … 2252 2255 2253 2256 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2254 do_action( 'xmlrpc_call', 'wp.deleteTerm' );2257 do_action( 'xmlrpc_call', 'wp.deleteTerm', $args, $this ); 2255 2258 2256 2259 if ( ! taxonomy_exists( $taxonomy ) ) { … … 2331 2334 2332 2335 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2333 do_action( 'xmlrpc_call', 'wp.getTerm' );2336 do_action( 'xmlrpc_call', 'wp.getTerm', $args, $this ); 2334 2337 2335 2338 if ( ! taxonomy_exists( $taxonomy ) ) { … … 2396 2399 2397 2400 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2398 do_action( 'xmlrpc_call', 'wp.getTerms' );2401 do_action( 'xmlrpc_call', 'wp.getTerms', $args, $this ); 2399 2402 2400 2403 if ( ! taxonomy_exists( $taxonomy ) ) { … … 2502 2505 2503 2506 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2504 do_action( 'xmlrpc_call', 'wp.getTaxonomy' );2507 do_action( 'xmlrpc_call', 'wp.getTaxonomy', $args, $this ); 2505 2508 2506 2509 if ( ! taxonomy_exists( $taxonomy ) ) { … … 2560 2563 2561 2564 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2562 do_action( 'xmlrpc_call', 'wp.getTaxonomies' );2565 do_action( 'xmlrpc_call', 'wp.getTaxonomies', $args, $this ); 2563 2566 2564 2567 $taxonomies = get_taxonomies( $filter, 'objects' ); … … 2646 2649 2647 2650 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2648 do_action( 'xmlrpc_call', 'wp.getUser' );2651 do_action( 'xmlrpc_call', 'wp.getUser', $args, $this ); 2649 2652 2650 2653 if ( ! current_user_can( 'edit_user', $user_id ) ) { … … 2709 2712 2710 2713 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2711 do_action( 'xmlrpc_call', 'wp.getUsers' );2714 do_action( 'xmlrpc_call', 'wp.getUsers', $args, $this ); 2712 2715 2713 2716 if ( ! current_user_can( 'list_users' ) ) { … … 2789 2792 2790 2793 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2791 do_action( 'xmlrpc_call', 'wp.getProfile' );2794 do_action( 'xmlrpc_call', 'wp.getProfile', $args, $this ); 2792 2795 2793 2796 if ( ! current_user_can( 'edit_user', $user->ID ) ) { … … 2839 2842 2840 2843 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2841 do_action( 'xmlrpc_call', 'wp.editProfile' );2844 do_action( 'xmlrpc_call', 'wp.editProfile', $args, $this ); 2842 2845 2843 2846 if ( ! current_user_can( 'edit_user', $user->ID ) ) { … … 2928 2931 2929 2932 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2930 do_action( 'xmlrpc_call', 'wp.getPage' );2933 do_action( 'xmlrpc_call', 'wp.getPage', $args, $this ); 2931 2934 2932 2935 // If we found the page then format the data. … … 2971 2974 2972 2975 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 2973 do_action( 'xmlrpc_call', 'wp.getPages' );2976 do_action( 'xmlrpc_call', 'wp.getPages', $args, $this ); 2974 2977 2975 2978 $pages = get_posts( … … 3026 3029 3027 3030 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3028 do_action( 'xmlrpc_call', 'wp.newPage' );3031 do_action( 'xmlrpc_call', 'wp.newPage', $args, $this ); 3029 3032 3030 3033 // Mark this as content for a page. … … 3063 3066 3064 3067 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3065 do_action( 'xmlrpc_call', 'wp.deletePage' );3068 do_action( 'xmlrpc_call', 'wp.deletePage', $args, $this ); 3066 3069 3067 3070 // Get the current page based on the 'page_id' and … … 3130 3133 3131 3134 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3132 do_action( 'xmlrpc_call', 'wp.editPage' );3135 do_action( 'xmlrpc_call', 'wp.editPage', $args, $this ); 3133 3136 3134 3137 // Get the page data and make sure it is a page. … … 3193 3196 3194 3197 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3195 do_action( 'xmlrpc_call', 'wp.getPageList' );3198 do_action( 'xmlrpc_call', 'wp.getPageList', $args, $this ); 3196 3199 3197 3200 // Get list of page IDs and titles. … … 3254 3257 3255 3258 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3256 do_action( 'xmlrpc_call', 'wp.getAuthors' );3259 do_action( 'xmlrpc_call', 'wp.getAuthors', $args, $this ); 3257 3260 3258 3261 $authors = array(); … … 3298 3301 3299 3302 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3300 do_action( 'xmlrpc_call', 'wp.getKeywords' );3303 do_action( 'xmlrpc_call', 'wp.getKeywords', $args, $this ); 3301 3304 3302 3305 $tags = array(); … … 3348 3351 3349 3352 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3350 do_action( 'xmlrpc_call', 'wp.newCategory' );3353 do_action( 'xmlrpc_call', 'wp.newCategory', $args, $this ); 3351 3354 3352 3355 // Make sure the user is allowed to add a category. … … 3431 3434 3432 3435 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3433 do_action( 'xmlrpc_call', 'wp.deleteCategory' );3436 do_action( 'xmlrpc_call', 'wp.deleteCategory', $args, $this ); 3434 3437 3435 3438 if ( ! current_user_can( 'delete_term', $category_id ) ) { … … 3488 3491 3489 3492 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3490 do_action( 'xmlrpc_call', 'wp.suggestCategories' );3493 do_action( 'xmlrpc_call', 'wp.suggestCategories', $args, $this ); 3491 3494 3492 3495 $category_suggestions = array(); … … 3534 3537 3535 3538 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3536 do_action( 'xmlrpc_call', 'wp.getComment' );3539 do_action( 'xmlrpc_call', 'wp.getComment', $args, $this ); 3537 3540 3538 3541 $comment = get_comment( $comment_id ); … … 3587 3590 3588 3591 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3589 do_action( 'xmlrpc_call', 'wp.getComments' );3592 do_action( 'xmlrpc_call', 'wp.getComments', $args, $this ); 3590 3593 3591 3594 if ( isset( $struct['status'] ) ) { … … 3682 3685 3683 3686 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3684 do_action( 'xmlrpc_call', 'wp.deleteComment' );3687 do_action( 'xmlrpc_call', 'wp.deleteComment', $args, $this ); 3685 3688 3686 3689 $status = wp_delete_comment( $comment_ID ); … … 3750 3753 3751 3754 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3752 do_action( 'xmlrpc_call', 'wp.editComment' );3755 do_action( 'xmlrpc_call', 'wp.editComment', $args, $this ); 3753 3756 $comment = array( 3754 3757 'comment_ID' => $comment_ID, … … 3943 3946 3944 3947 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3945 do_action( 'xmlrpc_call', 'wp.newComment' );3948 do_action( 'xmlrpc_call', 'wp.newComment', $args, $this ); 3946 3949 3947 3950 $comment_ID = wp_new_comment( $comment, true ); … … 3997 4000 3998 4001 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 3999 do_action( 'xmlrpc_call', 'wp.getCommentStatusList' );4002 do_action( 'xmlrpc_call', 'wp.getCommentStatusList', $args, $this ); 4000 4003 4001 4004 return get_comment_statuses(); … … 4039 4042 4040 4043 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4041 do_action( 'xmlrpc_call', 'wp.getCommentCount' );4044 do_action( 'xmlrpc_call', 'wp.getCommentCount', $args, $this ); 4042 4045 4043 4046 $count = wp_count_comments( $post_id ); … … 4081 4084 4082 4085 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4083 do_action( 'xmlrpc_call', 'wp.getPostStatusList' );4086 do_action( 'xmlrpc_call', 'wp.getPostStatusList', $args, $this ); 4084 4087 4085 4088 return get_post_statuses(); … … 4116 4119 4117 4120 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4118 do_action( 'xmlrpc_call', 'wp.getPageStatusList' );4121 do_action( 'xmlrpc_call', 'wp.getPageStatusList', $args, $this ); 4119 4122 4120 4123 return get_page_statuses(); … … 4309 4312 4310 4313 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4311 do_action( 'xmlrpc_call', 'wp.getMediaItem' );4314 do_action( 'xmlrpc_call', 'wp.getMediaItem', $args, $this ); 4312 4315 4313 4316 $attachment = get_post( $attachment_id ); … … 4362 4365 4363 4366 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4364 do_action( 'xmlrpc_call', 'wp.getMediaLibrary' );4367 do_action( 'xmlrpc_call', 'wp.getMediaLibrary', $args, $this ); 4365 4368 4366 4369 $parent_id = ( isset( $struct['parent_id'] ) ) ? absint( $struct['parent_id'] ) : ''; … … 4418 4421 4419 4422 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4420 do_action( 'xmlrpc_call', 'wp.getPostFormats' );4423 do_action( 'xmlrpc_call', 'wp.getPostFormats', $args, $this ); 4421 4424 4422 4425 $formats = get_post_format_strings(); … … 4498 4501 4499 4502 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4500 do_action( 'xmlrpc_call', 'wp.getPostType' );4503 do_action( 'xmlrpc_call', 'wp.getPostType', $args, $this ); 4501 4504 4502 4505 if ( ! post_type_exists( $post_type_name ) ) { … … 4555 4558 4556 4559 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4557 do_action( 'xmlrpc_call', 'wp.getPostTypes' );4560 do_action( 'xmlrpc_call', 'wp.getPostTypes', $args, $this ); 4558 4561 4559 4562 $post_types = get_post_types( $filter, 'objects' ); … … 4625 4628 4626 4629 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4627 do_action( 'xmlrpc_call', 'wp.getRevisions' );4630 do_action( 'xmlrpc_call', 'wp.getRevisions', $args, $this ); 4628 4631 4629 4632 $post = get_post( $post_id ); … … 4699 4702 4700 4703 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4701 do_action( 'xmlrpc_call', 'wp.restoreRevision' );4704 do_action( 'xmlrpc_call', 'wp.restoreRevision', $args, $this ); 4702 4705 4703 4706 $revision = wp_get_post_revision( $revision_id ); … … 4770 4773 4771 4774 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4772 do_action( 'xmlrpc_call', 'blogger.getUsersBlogs' );4775 do_action( 'xmlrpc_call', 'blogger.getUsersBlogs', $args, $this ); 4773 4776 4774 4777 $is_admin = current_user_can( 'manage_options' ); … … 4856 4859 4857 4860 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4858 do_action( 'xmlrpc_call', 'blogger.getUserInfo' );4861 do_action( 'xmlrpc_call', 'blogger.getUserInfo', $args, $this ); 4859 4862 4860 4863 $struct = array( … … 4906 4909 4907 4910 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4908 do_action( 'xmlrpc_call', 'blogger.getPost' );4911 do_action( 'xmlrpc_call', 'blogger.getPost', $args, $this ); 4909 4912 4910 4913 $categories = implode( ',', wp_get_post_categories( $post_ID ) ); … … 4963 4966 4964 4967 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 4965 do_action( 'xmlrpc_call', 'blogger.getRecentPosts' );4968 do_action( 'xmlrpc_call', 'blogger.getRecentPosts', $args, $this ); 4966 4969 4967 4970 $posts_list = wp_get_recent_posts( $query ); … … 5053 5056 5054 5057 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5055 do_action( 'xmlrpc_call', 'blogger.newPost' );5058 do_action( 'xmlrpc_call', 'blogger.newPost', $args, $this ); 5056 5059 5057 5060 $cap = ( $publish ) ? 'publish_posts' : 'edit_posts'; … … 5130 5133 5131 5134 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5132 do_action( 'xmlrpc_call', 'blogger.editPost' );5135 do_action( 'xmlrpc_call', 'blogger.editPost', $args, $this ); 5133 5136 5134 5137 $actual_post = get_post( $post_ID, ARRAY_A ); … … 5204 5207 5205 5208 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5206 do_action( 'xmlrpc_call', 'blogger.deletePost' );5209 do_action( 'xmlrpc_call', 'blogger.deletePost', $args, $this ); 5207 5210 5208 5211 $actual_post = get_post( $post_ID, ARRAY_A ); … … 5292 5295 5293 5296 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5294 do_action( 'xmlrpc_call', 'metaWeblog.newPost' );5297 do_action( 'xmlrpc_call', 'metaWeblog.newPost', $args, $this ); 5295 5298 5296 5299 $page_template = ''; … … 5671 5674 5672 5675 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 5673 do_action( 'xmlrpc_call', 'metaWeblog.editPost' );5676 do_action( 'xmlrpc_call', 'metaWeblog.editPost', $args, $this ); 5674 5677 5675 5678 $postdata = get_post( $post_ID, ARRAY_A ); … … 6009 6012 6010 6013 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6011 do_action( 'xmlrpc_call', 'metaWeblog.getPost' );6014 do_action( 'xmlrpc_call', 'metaWeblog.getPost', $args, $this ); 6012 6015 6013 6016 if ( '' !== $postdata['post_date'] ) { … … 6150 6153 6151 6154 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6152 do_action( 'xmlrpc_call', 'metaWeblog.getRecentPosts' );6155 do_action( 'xmlrpc_call', 'metaWeblog.getRecentPosts', $args, $this ); 6153 6156 6154 6157 $posts_list = wp_get_recent_posts( $query ); … … 6271 6274 6272 6275 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6273 do_action( 'xmlrpc_call', 'metaWeblog.getCategories' );6276 do_action( 'xmlrpc_call', 'metaWeblog.getCategories', $args, $this ); 6274 6277 6275 6278 $categories_struct = array(); … … 6332 6335 6333 6336 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6334 do_action( 'xmlrpc_call', 'metaWeblog.newMediaObject' );6337 do_action( 'xmlrpc_call', 'metaWeblog.newMediaObject', $args, $this ); 6335 6338 6336 6339 if ( ! current_user_can( 'upload_files' ) ) { … … 6451 6454 6452 6455 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6453 do_action( 'xmlrpc_call', 'mt.getRecentPostTitles' );6456 do_action( 'xmlrpc_call', 'mt.getRecentPostTitles', $args, $this ); 6454 6457 6455 6458 $posts_list = wp_get_recent_posts( $query ); … … 6513 6516 6514 6517 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6515 do_action( 'xmlrpc_call', 'mt.getCategoryList' );6518 do_action( 'xmlrpc_call', 'mt.getCategoryList', $args, $this ); 6516 6519 6517 6520 $categories_struct = array(); … … 6571 6574 6572 6575 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6573 do_action( 'xmlrpc_call', 'mt.getPostCategories' );6576 do_action( 'xmlrpc_call', 'mt.getPostCategories', $args, $this ); 6574 6577 6575 6578 $categories = array(); … … 6618 6621 6619 6622 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6620 do_action( 'xmlrpc_call', 'mt.setPostCategories' );6623 do_action( 'xmlrpc_call', 'mt.setPostCategories', $args, $this ); 6621 6624 6622 6625 if ( ! get_post( $post_ID ) ) { … … 6647 6650 public function mt_supportedMethods() { 6648 6651 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6649 do_action( 'xmlrpc_call', 'mt.supportedMethods' );6652 do_action( 'xmlrpc_call', 'mt.supportedMethods', $args, $this ); 6650 6653 6651 6654 return array_keys( $this->methods ); … … 6659 6662 public function mt_supportedTextFilters() { 6660 6663 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6661 do_action( 'xmlrpc_call', 'mt.supportedTextFilters' );6664 do_action( 'xmlrpc_call', 'mt.supportedTextFilters', $args, $this ); 6662 6665 6663 6666 /** … … 6685 6688 6686 6689 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6687 do_action( 'xmlrpc_call', 'mt.getTrackbackPings' );6690 do_action( 'xmlrpc_call', 'mt.getTrackbackPings', $post_ID, $this ); 6688 6691 6689 6692 $actual_post = get_post( $post_ID, ARRAY_A ); … … 6742 6745 6743 6746 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6744 do_action( 'xmlrpc_call', 'mt.publishPost' );6747 do_action( 'xmlrpc_call', 'mt.publishPost', $args, $this ); 6745 6748 6746 6749 $postdata = get_post( $post_ID, ARRAY_A ); … … 6784 6787 6785 6788 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6786 do_action( 'xmlrpc_call', 'pingback.ping' );6789 do_action( 'xmlrpc_call', 'pingback.ping', $args, $this ); 6787 6790 6788 6791 $this->escape( $args ); … … 7023 7026 7024 7027 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 7025 do_action( 'xmlrpc_call', 'pingback.extensions.getPingbacks' );7028 do_action( 'xmlrpc_call', 'pingback.extensions.getPingbacks', $url, $this ); 7026 7029 7027 7030 $url = $this->escape( $url );
Note: See TracChangeset
for help on using the changeset viewer.