Changeset 55316
- Timestamp:
- 02/13/2023 03:16:55 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r55308 r55316 1 1 <?php 2 2 /** 3 * XML-RPC protocol support for WordPress 3 * XML-RPC protocol support for WordPress. 4 4 * 5 5 * @package WordPress … … 61 61 * Registers all of the XMLRPC methods that XMLRPC server understands. 62 62 * 63 * Sets up server and method property. Passes XMLRPC 64 * methods through the {@see 'xmlrpc_methods'} filter to allow plugins to extend65 * or replaceXML-RPC methods.63 * Sets up server and method property. Passes XMLRPC methods through the 64 * {@see 'xmlrpc_methods'} filter to allow plugins to extend or replace 65 * XML-RPC methods. 66 66 * 67 67 * @since 1.5.0 … … 178 178 179 179 /** 180 * Set wp_xmlrpc_server::$is_enabled property.181 * 182 * Determine whether the xmlrpc server is enabled on this WordPress install180 * Sets wp_xmlrpc_server::$is_enabled property. 181 * 182 * Determines whether the xmlrpc server is enabled on this WordPress install 183 183 * and set the is_enabled property accordingly. 184 184 * … … 221 221 222 222 /** 223 * Make private/protected methods readable for backward compatibility.223 * Makes private/protected methods readable for backward compatibility. 224 224 * 225 225 * @since 4.0.0 … … 246 246 247 247 /** 248 * Test XMLRPC API by saying, "Hello!" to client.248 * Tests XMLRPC API by saying, "Hello!" to client. 249 249 * 250 250 * @since 1.5.0 … … 257 257 258 258 /** 259 * Test XMLRPC API by adding two numbers for client.259 * Tests XMLRPC API by adding two numbers for client. 260 260 * 261 261 * @since 1.5.0 … … 276 276 277 277 /** 278 * Log user in.278 * Logs user in. 279 279 * 280 280 * @since 2.8.0 … … 282 282 * @param string $username User's username. 283 283 * @param string $password User's password. 284 * @return WP_User|false WP_User object if authentication passed, false otherwise 284 * @return WP_User|false WP_User object if authentication passed, false otherwise. 285 285 */ 286 286 public function login( $username, $password ) { … … 319 319 320 320 /** 321 * Check user's credentials. Deprecated.321 * Checks user's credentials. Deprecated. 322 322 * 323 323 * @since 1.5.0 … … 334 334 335 335 /** 336 * Escape string or array of strings for database.336 * Escapes string or array of strings for database. 337 337 * 338 338 * @since 1.5.2 … … 357 357 358 358 /** 359 * Send error response to client.360 * 361 * Send an XML error response to the client. If the endpoint is enabled359 * Sends error response to client. 360 * 361 * Sends an XML error response to the client. If the endpoint is enabled 362 362 * an HTTP 200 response is always sent per the XML-RPC specification. 363 363 * … … 381 381 382 382 /** 383 * Retrieve custom fields for post.383 * Retrieves custom fields for post. 384 384 * 385 385 * @since 2.5.0 … … 410 410 411 411 /** 412 * Set custom fields for post.412 * Sets custom fields for post. 413 413 * 414 414 * @since 2.5.0 … … 448 448 449 449 /** 450 * Retrieve custom fields for a term.450 * Retrieves custom fields for a term. 451 451 * 452 452 * @since 4.9.0 … … 477 477 478 478 /** 479 * Set custom fields for a term.479 * Sets custom fields for a term. 480 480 * 481 481 * @since 4.9.0 … … 510 510 511 511 /** 512 * Set up blog options property.512 * Sets up blog options property. 513 513 * 514 514 * Passes property through {@see 'xmlrpc_blog_options'} filter. … … 679 679 680 680 /** 681 * Retrieve the blogs of the user.681 * Retrieves the blogs of the user. 682 682 * 683 683 * @since 2.6.0 … … 869 869 870 870 /** 871 * Convert a WordPress date string to an IXR_Date object.871 * Converts a WordPress date string to an IXR_Date object. 872 872 * 873 873 * @param string $date Date string to convert. … … 882 882 883 883 /** 884 * Convert a WordPress GMT date string to an IXR_Date object.884 * Converts a WordPress GMT date string to an IXR_Date object. 885 885 * 886 886 * @param string $date_gmt WordPress GMT date string. … … 1262 1262 1263 1263 /** 1264 * Create a new post for any registered post type.1264 * Creates a new post for any registered post type. 1265 1265 * 1266 1266 * @since 3.4.0 … … 1362 1362 1363 1363 /** 1364 * Encapsulate the logic for sticking a post1365 * and determining if the user has permission to do so1364 * Encapsulates the logic for sticking a post and determining if 1365 * the user has permission to do so. 1366 1366 * 1367 1367 * @since 4.3.0 … … 1707 1707 1708 1708 /** 1709 * Edit a post for any registered post type.1709 * Edits a post for any registered post type. 1710 1710 * 1711 1711 * The $content_struct parameter only needs to contain fields that … … 1793 1793 1794 1794 /** 1795 * Delete a post for any registered post type.1795 * Deletes a post for any registered post type. 1796 1796 * 1797 1797 * @since 3.4.0 … … 1847 1847 1848 1848 /** 1849 * Retrieve a post.1849 * Retrieves a post. 1850 1850 * 1851 1851 * @since 3.4.0 … … 1942 1942 1943 1943 /** 1944 * Retrieve posts.1944 * Retrieves posts. 1945 1945 * 1946 1946 * @since 3.4.0 … … 2051 2051 2052 2052 /** 2053 * Create a new term.2053 * Creates a new term. 2054 2054 * 2055 2055 * @since 3.4.0 … … 2154 2154 2155 2155 /** 2156 * Edit a term.2156 * Edits a term. 2157 2157 * 2158 2158 * @since 3.4.0 … … 2272 2272 2273 2273 /** 2274 * Delete a term.2274 * Deletes a term. 2275 2275 * 2276 2276 * @since 3.4.0 … … 2342 2342 2343 2343 /** 2344 * Retrieve a term.2344 * Retrieves a term. 2345 2345 * 2346 2346 * @since 3.4.0 … … 2412 2412 2413 2413 /** 2414 * Retrieve all terms for a taxonomy.2414 * Retrieves all terms for a taxonomy. 2415 2415 * 2416 2416 * @since 3.4.0 … … 2507 2507 2508 2508 /** 2509 * Retrieve a taxonomy.2509 * Retrieves a taxonomy. 2510 2510 * 2511 2511 * @since 3.4.0 … … 2573 2573 2574 2574 /** 2575 * Retrieve all taxonomies.2575 * Retrieves all taxonomies. 2576 2576 * 2577 2577 * @since 3.4.0 … … 2635 2635 2636 2636 /** 2637 * Retrieve a user.2637 * Retrieves a user. 2638 2638 * 2639 2639 * The optional $fields parameter specifies what fields will be included … … 2717 2717 2718 2718 /** 2719 * Retrieve users.2719 * Retrieves users. 2720 2720 * 2721 2721 * The optional $filter parameter modifies the query used to retrieve users. … … 2807 2807 2808 2808 /** 2809 * Retrieve information about the requesting user.2809 * Retrieves information about the requesting user. 2810 2810 * 2811 2811 * @uses get_userdata() … … 2856 2856 2857 2857 /** 2858 * Edit user's profile.2858 * Edits user's profile. 2859 2859 * 2860 2860 * @uses wp_update_user() … … 2947 2947 2948 2948 /** 2949 * Retrieve page.2949 * Retrieves a page. 2950 2950 * 2951 2951 * @since 2.2.0 … … 2995 2995 2996 2996 /** 2997 * Retrieve Pages.2997 * Retrieves Pages. 2998 2998 * 2999 2999 * @since 2.2.0 … … 3054 3054 3055 3055 /** 3056 * Create new page.3056 * Creates a new page. 3057 3057 * 3058 3058 * @since 2.2.0 … … 3091 3091 3092 3092 /** 3093 * Delete page.3093 * Deletes a page. 3094 3094 * 3095 3095 * @since 2.2.0 … … 3152 3152 3153 3153 /** 3154 * Edit page.3154 * Edits a page. 3155 3155 * 3156 3156 * @since 2.2.0 … … 3215 3215 3216 3216 /** 3217 * Retrieve page list.3217 * Retrieves page list. 3218 3218 * 3219 3219 * @since 2.2.0 … … 3280 3280 3281 3281 /** 3282 * Retrieve authors list.3282 * Retrieves authors list. 3283 3283 * 3284 3284 * @since 2.2.0 … … 3324 3324 3325 3325 /** 3326 * Get list of all tags3326 * Gets the list of all tags. 3327 3327 * 3328 3328 * @since 2.7.0 … … 3376 3376 3377 3377 /** 3378 * Create new category.3378 * Creates a new category. 3379 3379 * 3380 3380 * @since 2.2.0 … … 3459 3459 3460 3460 /** 3461 * Removecategory.3461 * Deletes a category. 3462 3462 * 3463 3463 * @since 2.5.0 … … 3510 3510 3511 3511 /** 3512 * Retrieve category list.3512 * Retrieves category list. 3513 3513 * 3514 3514 * @since 2.2.0 … … 3562 3562 3563 3563 /** 3564 * Retrieve comment.3564 * Retrieves a comment. 3565 3565 * 3566 3566 * @since 2.7.0 … … 3604 3604 3605 3605 /** 3606 * Retrieve comments.3606 * Retrieves comments. 3607 3607 * 3608 3608 * Besides the common blog_id (unused), username, and password arguments, it takes a filter … … 3627 3627 * @type array $3 Optional. Query arguments. 3628 3628 * } 3629 * @return array|IXR_Error Contains a collection of comments. See wp_xmlrpc_server::wp_getComment() for a description of each item contents 3629 * @return array|IXR_Error Contains a collection of comments. See wp_xmlrpc_server::wp_getComment() 3630 * for a description of each item contents. 3630 3631 */ 3631 3632 public function wp_getComments( $args ) { … … 3699 3700 3700 3701 /** 3701 * Delete a comment.3702 * Deletes a comment. 3702 3703 * 3703 3704 * By default, the comment will be moved to the Trash instead of deleted. … … 3757 3758 3758 3759 /** 3759 * Edit comment.3760 * Edits a comment. 3760 3761 * 3761 3762 * Besides the common blog_id (unused), username, and password arguments, it takes a … … 3768 3769 * - 'content' 3769 3770 * - 'date_created_gmt' 3770 * - 'status'. Common statuses are 'approve', 'hold', 'spam'. See get_comment_statuses() for more details 3771 * - 'status'. Common statuses are 'approve', 'hold', 'spam'. See get_comment_statuses() for more details. 3771 3772 * 3772 3773 * @since 2.7.0 … … 3868 3869 3869 3870 /** 3870 * Create new comment.3871 * Creates a new comment. 3871 3872 * 3872 3873 * @since 2.7.0 … … 4023 4024 4024 4025 /** 4025 * Retrieve all of the comment status.4026 * Retrieves all of the comment status. 4026 4027 * 4027 4028 * @since 2.7.0 … … 4058 4059 4059 4060 /** 4060 * Retrieve comment count.4061 * Retrieves comment counts. 4061 4062 * 4062 4063 * @since 2.5.0 … … 4107 4108 4108 4109 /** 4109 * Retrieve post statuses.4110 * Retrieves post statuses. 4110 4111 * 4111 4112 * @since 2.5.0 … … 4142 4143 4143 4144 /** 4144 * Retrieve page statuses.4145 * Retrieves page statuses. 4145 4146 * 4146 4147 * @since 2.5.0 … … 4177 4178 4178 4179 /** 4179 * Retrieve page templates.4180 * Retrieves page templates. 4180 4181 * 4181 4182 * @since 2.6.0 … … 4212 4213 4213 4214 /** 4214 * Retrieve blog options.4215 * Retrieves blog options. 4215 4216 * 4216 4217 * @since 2.6.0 … … 4247 4248 4248 4249 /** 4249 * Retrieve blog options value from list.4250 * Retrieves blog options value from list. 4250 4251 * 4251 4252 * @since 2.6.0 … … 4276 4277 4277 4278 /** 4278 * Update blog options.4279 * Updates blog options. 4279 4280 * 4280 4281 * @since 2.6.0 … … 4325 4326 4326 4327 /** 4327 * Retrieve a media item by ID4328 * Retrieves a media item by ID. 4328 4329 * 4329 4330 * @since 3.1.0 … … 4375 4376 4376 4377 /** 4377 * Retrieves a collection of media library items (or attachments) 4378 * Retrieves a collection of media library items (or attachments). 4378 4379 * 4379 4380 * Besides the common blog_id (unused), username, and password arguments, it takes a filter … … 4398 4399 * @type array $3 Query arguments. 4399 4400 * } 4400 * @return array|IXR_Error Contains a collection of media items. See wp_xmlrpc_server::wp_getMediaItem() for a description of each item contents 4401 * @return array|IXR_Error Contains a collection of media items. 4402 * See wp_xmlrpc_server::wp_getMediaItem() for 4403 * a description of each item contents. 4401 4404 */ 4402 4405 public function wp_getMediaLibrary( $args ) { … … 4496 4499 4497 4500 /** 4498 * Retrieves a post type 4501 * Retrieves a post type. 4499 4502 * 4500 4503 * @since 3.4.0 … … 4569 4572 4570 4573 /** 4571 * Retrieves a post types4574 * Retrieves post types. 4572 4575 * 4573 4576 * @since 3.4.0 … … 4628 4631 4629 4632 /** 4630 * Retrieve revisions for a specific post.4633 * Retrieves revisions for a specific post. 4631 4634 * 4632 4635 * @since 3.5.0 … … 4721 4724 4722 4725 /** 4723 * Restore a post revision4726 * Restores a post revision. 4724 4727 * 4725 4728 * @since 3.5.0 … … 4790 4793 4791 4794 /** 4792 * Retrieve blogs that user owns.4795 * Retrieves blogs that user owns. 4793 4796 * 4794 4797 * Will make more sense once we support multiple blogs. … … 4841 4844 4842 4845 /** 4843 * Private function for retrieving a users blogs for multisite setups 4846 * Private function for retrieving a users blogs for multisite setups. 4844 4847 * 4845 4848 * @since 3.0.0 … … 4878 4881 4879 4882 /** 4880 * Retrieve user's data.4883 * Retrieves user's data. 4881 4884 * 4882 4885 * Gives your client some info about you, so you don't have to. … … 4923 4926 4924 4927 /** 4925 * Retrieve post.4928 * Retrieves a post. 4926 4929 * 4927 4930 * @since 1.5.0 … … 4978 4981 4979 4982 /** 4980 * Retrieve list of recent posts.4983 * Retrieves the list of recent posts. 4981 4984 * 4982 4985 * @since 1.5.0 … … 5076 5079 5077 5080 /** 5078 * Creates new post.5081 * Creates a new post. 5079 5082 * 5080 5083 * @since 1.5.0 … … 5151 5154 5152 5155 /** 5153 * Edit a post.5156 * Edits a post. 5154 5157 * 5155 5158 * @since 1.5.0 … … 5230 5233 5231 5234 /** 5232 * Removea post.5235 * Deletes a post. 5233 5236 * 5234 5237 * @since 1.5.0 … … 5294 5297 5295 5298 /** 5296 * Create a new post.5299 * Creates a new post. 5297 5300 * 5298 5301 * The 'content_struct' argument must contain: … … 5666 5669 5667 5670 /** 5668 * Attach upload to a post.5671 * Attaches an upload to a post. 5669 5672 * 5670 5673 * @since 2.1.0 … … 5690 5693 5691 5694 /** 5692 * Edit a post.5695 * Edits a post. 5693 5696 * 5694 5697 * @since 1.5.0 … … 6022 6025 6023 6026 /** 6024 * Retrieve post.6027 * Retrieves a post. 6025 6028 * 6026 6029 * @since 1.5.0 … … 6163 6166 6164 6167 /** 6165 * Retrieve list of recent posts.6168 * Retrieves list of recent posts. 6166 6169 * 6167 6170 * @since 1.5.0 … … 6290 6293 6291 6294 /** 6292 * Retrieve the list of categories on a given blog.6295 * Retrieves the list of categories on a given blog. 6293 6296 * 6294 6297 * @since 1.5.0 … … 6468 6471 6469 6472 /** 6470 * Retrieve the post titles of recent posts.6473 * Retrieves the post titles of recent posts. 6471 6474 * 6472 6475 * @since 1.5.0 … … 6532 6535 6533 6536 /** 6534 * Retrieve list of all categories onblog.6537 * Retrieves the list of all categories on a blog. 6535 6538 * 6536 6539 * @since 1.5.0 … … 6585 6588 6586 6589 /** 6587 * Retrieve post categories.6590 * Retrieves post categories. 6588 6591 * 6589 6592 * @since 1.5.0 … … 6687 6690 6688 6691 /** 6689 * Retrieve an array of methods supported by this server.6692 * Retrieves an array of methods supported by this server. 6690 6693 * 6691 6694 * @since 1.5.0 … … 6701 6704 6702 6705 /** 6703 * Retrieve an empty array because we don't support per-post text filters.6706 * Retrieves an empty array because we don't support per-post text filters. 6704 6707 * 6705 6708 * @since 1.5.0 … … 6720 6723 6721 6724 /** 6722 * Retrieve trackbacks sent to a given post.6725 * Retrieves trackbacks sent to a given post. 6723 6726 * 6724 6727 * @since 1.5.0 … … 7061 7064 7062 7065 /** 7063 * Retrieve array of URLs that pingbacked the given URL.7066 * Retrieves an array of URLs that pingbacked the given URL. 7064 7067 * 7065 7068 * Specs on http://www.aquarionics.com/misc/archives/blogite/0198.html
Note: See TracChangeset
for help on using the changeset viewer.