Scott Taylor
79656b5fdd
Uploader: Fire 'wp_handle_upload' in wp_upload_bits(). Thusly, the filter in wp_xmlrpc_server::mw_newMediaObject() is redundant.
...
Props dllh.
Fixes #33539 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34257 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 04:46:00 +00:00
Dominik Schilling (ocean90)
354000b5ca
XMLRPC: Don't allow private posts to be sticky.
...
See #20662 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34135 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 22:37:21 +00:00
Scott Taylor
60ba8b05e4
Introduce WP_Comment class to model/strongly-type rows from the comments database table. Inclusion of this class is a pre-req for some more general comment cleanup and sanity.
...
* Takes inspiration from `WP_Post` and adds sanity to comment caching.
* Clarifies when the current global value for `$comment` is returned. The current implementation in `get_comment()` introduces side effects and an occasion stale global value for `$comment` when comment caches are cleaned.
* Strongly-types `@param` docs
* This class is marked `final` for now
Props wonderboymusic, nacin.
See #32619 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33891 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-03 18:16:35 +00:00
Sergey Biryukov
708cd13d77
Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/users.php.
...
props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33679 . see #14530 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33885 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-03 08:53:23 +00:00
Sergey Biryukov
50224510ec
Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/edit.php.
...
props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33671 . see #14530 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33861 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-02 18:14:14 +00:00
Scott Taylor
3b8c5529cb
foreach is a statement, not a function.
...
See #33491 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33734 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-25 20:27:56 +00:00
Scott Taylor
5d494bae12
Doc block for_wp_specialchars: $quote_style can also be string ('single' or 'double')
...
See #33491 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33700 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 18:35:31 +00:00
Drew Jaynes
d83fcf8e9c
Docs: Standardize @deprecated tag formatting in the DocBlock for wp_xmlrpc_server::login_pass_ok().
...
Props Alphawolf.
See #28806 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33677 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 22:37:16 +00:00
Scott Taylor
4b746c4b4e
Deprecate post_permalink() (Introduced in 1.0, already had a deprecated argument in 1.3), which just wraps get_permalink() and was only used by XML-RPC in 4 places.
...
Props solarissmoke.
Fixes #16982 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33659 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 06:24:00 +00:00
Scott Taylor
df480edb24
After [33325], supply a missing post_type in ->mw_editPost().
...
Add unit test.
Props ocean90.
Fixes #20662 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33612 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-13 15:27:57 +00:00
Drew Jaynes
31b4c0c6a5
Docs: Fix incorrect indentation for the wp_xmlrpc_server->wp_getPostFormats() DocBlock.
...
Also adds a missing return description.
Props TomHarrigan.
Fixes #33078 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33407 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-23 13:18:07 +00:00
Scott Taylor
180d8b3eb0
After [33325], add a doc summary.
...
Fixes #20662 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33343 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-21 15:17:30 +00:00
Scott Taylor
e690aa50ad
Ensure that private posts cannot be made sticky via Quick Edit.
...
DRY the logic for stickies in `wp_xmlrpc_server` by introducing `->_toggle_sticky()`.
Props wonderboymusic, obenland, chriscct7.
Fixes #20662 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33325 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-19 18:08:55 +00:00
Konstantin Obenland
bfbdb6f0b2
Use get_default_comment_status() globally.
...
Also makes the filter name static and passes the post type for context.
Props valendesigns.
Fixes #31168 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33054 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-02 22:31:58 +00:00
Dion Hulse
2959d58c91
XML-RPC: Only escape what we need to in wp.editPage, this allows for passwords with the special characters "' to work in a request.
...
Props redsweater for initial Patch.
Fixes #32703
git-svn-id: https://develop.svn.wordpress.org/trunk@32993 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-29 02:06:25 +00:00
Scott Taylor
296c559baf
if is a statment, not a function.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32800 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 20:00:15 +00:00
Scott Taylor
9c42e158bc
$status shouldn't be loosely compared to true in wp_xmlrpc_server::wp_deleteComment().
...
`$initial` shouldn't be loosely compared to `true` in `get_calendar()`.
`current_user_can()` shouldn't be loosely compared to `false` in `kses_init()`
`$get_all` shouldn't be loosely compared to `true` in `get_blog_details()`.
`is_array()` and `in_array()` shouldn't be loosely compared in `wpmu_validate_user_signup()`.
`$result` should by strictly compared in `check_ajax_referer()`.
`wp_verify_nonce()` should by strictly compared in `_show_post_preview()`.
`is_user_logged_in()` should not be loosly compared against `false` in `wp-signup.php`.
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32733 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 17:47:16 +00:00
Scott Taylor
ef6315a7a2
After [32656], add @access annotations to methods that have no doc block in wp-includes/*.
...
Makes it easier to search for no doc blocks via `}[\n\t\r ]+(protected|private|public)`.
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32657 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 21:36:38 +00:00
Scott Taylor
bd06ad2725
get_comments() can return int, so a few places need to check if the return value is traversable before passing what is assumed to be an array.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32600 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 17:58:52 +00:00
Drew Jaynes
7baa0296ad
Fix inline documentation syntax in wp_xmlrpc_server.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32591 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 06:24:27 +00:00
Drew Jaynes
248b17974d
Clarify that wp_xmlrpc_server->wp_getTaxonomies() returns an IXR_Error instance on failure.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32586 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 20:34:07 +00:00
Drew Jaynes
f336aab356
Add missing argument descriptions for the $args parameter in wp_xmlrpc_server->wp_getTaxonomies().
...
Also documents missing `$filter` and `$fields` arguments and associated descriptions, and clarifies the return description.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32585 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 20:32:09 +00:00
Drew Jaynes
9613dd3a84
Add missing argument descriptions for the $args parameter in wp_xmlrpc_server->wp_getTaxonomy().
...
Also clarifies the return description.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32584 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 20:14:49 +00:00
Drew Jaynes
4b7db61698
Add missing argument descriptions for the $args parameter in wp_xmlrpc_server->wp_getTerms().
...
Also clarifies the return description.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32583 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 20:10:27 +00:00
Drew Jaynes
7cafb17a5e
Add missing $args parameter descriptions for wp_xmlrpc_server->wp_getTerm().
...
Also clarifies the return description.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32582 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 20:07:01 +00:00
Drew Jaynes
b5b9cda58d
Convert the $args parameter documentation for wp_xmlrpc_server->wp_newPost() into a hash notation.
...
Also adds more in-depth documentation and a link for information on enclosures.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32581 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 19:58:54 +00:00
Drew Jaynes
2c32effa02
In most wp_xmlrpc_server methods that accept an array of arguments, the argument order is important.
...
With the converstion to hash notations from simple lists in the inline documentation, it's especially important to make that requirement clear.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32579 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 17:18:47 +00:00
Drew Jaynes
0474aa9374
Convert the $args parameter documentation in wp_xmlrpc_server->wp_deleteTerm() into a hash notation.
...
Also clarifies the return description.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32578 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 17:01:37 +00:00
Drew Jaynes
633677efb0
Convert the $args parameter documentation in wp_xmlrpc_server->wp_editTerm() to a hash notation.
...
Also clarifies the return description.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32577 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 16:59:26 +00:00
Drew Jaynes
d07e39be55
Convert the $args parameter documentation in wp_xmlrpc_server->wp_newTerm() into a hash notation.
...
Also clarifies the return description.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32576 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 16:55:38 +00:00
Drew Jaynes
e117da47eb
Convert the $args parameter for wp_xmlrpc_server->wp_getPosts() into a hash notation.
...
Also considates documentation to the argument descriptions themselves.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32575 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 16:50:53 +00:00
Drew Jaynes
6548f58224
Define the default values for the $fields parameter in the xmlrpc_default_post_fields hook docs.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32574 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 16:45:53 +00:00
Drew Jaynes
2c2cf3b037
Convert the $args parameter documentation in wp_xmlrpc_server->wp_getPost() into a hash notation.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32573 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 16:44:21 +00:00
Drew Jaynes
a52e959d8e
Add missing argument descriptions in the DocBlock for wp_xmlrpc_server->wp_deletePost().
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32572 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 16:40:23 +00:00
Konstantin Obenland
065cdadce9
Improve description for link notification option.
...
Makes it clear that the option only applies to new articles.
Props chriscct7.
Fixes #22961 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32569 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 07:54:06 +00:00
Scott Taylor
39ef6a72c5
Use void instead of null where appropriate when pipe-delimiting @return types. If a @return only contains void, remove it.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32568 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 05:39:47 +00:00
Drew Jaynes
f270cd90c5
Add missing or incomplete argument and return descriptions for wp_xmlrpc_server->wp_editPost().
...
Also includes many small syntax fixes for inline documentation throughout the file.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32565 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:46:45 +00:00
Drew Jaynes
4b70ff7721
Add missing parameter and return descriptions to the DocBlock for wp_xmlrpc_server->_convert_date_gmt().
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32564 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:40:35 +00:00
Drew Jaynes
e3b95fa4d6
Add missing parameter and return descriptions to the DocBlock for wp_xmlrpc_server->_convert_date().
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32563 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:39:30 +00:00
Drew Jaynes
366c5abe4d
Fix inline documentation syntax in the DocBlock for wp_xmlrpc_server->_prepare_taxonomy().
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32562 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:37:57 +00:00
Drew Jaynes
839eb02ec0
Fix some inline documentation syntax in the DocBlock for wp_xmlrpc_server->minimum_args().
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32561 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:36:43 +00:00
Drew Jaynes
b0f632a406
Use a valid parameter type of string for the $name parameter in the xmlrpc_call hook docs.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32560 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:35:33 +00:00
Drew Jaynes
967f52add2
Add missing argument descriptions for the $args hash notation in wp_xmlrpc_server->wp_getUsersBlogs().
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32559 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:32:06 +00:00
Drew Jaynes
ee71a2ea33
Properly notate the inline link to the xmlrpc_blog_options filter in the description for wp_xmlrpc_server->initialise_blog_option_info().
...
See #30224 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32558 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:29:45 +00:00
Drew Jaynes
644b0e27a3
Add a proper return description for the wp_xmlrpc_server->addTwoNumbers() method.
...
See [30181]. See #30224 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32557 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:25:38 +00:00
Drew Jaynes
206debf59e
Add proper descriptions for the $methods, $blog_options, and $error properties in wp_xmlrpc_server.
...
See [30181]. See #30224 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32556 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-23 19:22:40 +00:00
Scott Taylor
4ab280361c
Upgrade the doc blocks in class-wp-xmlrpc-server.php. Rehabilitate some unfortunate use of tabbing.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32550 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-22 19:36:22 +00:00
Dominik Schilling (ocean90)
cfa32bc1d7
Merge similar error strings for invalid data.
...
props pavelevap.
fixes #32329 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32477 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-09 21:08:57 +00:00
Sergey Biryukov
e71959fc57
Remove duplicate string with a typo, merge it with an existing string.
...
props pavelevap.
fixes #32020 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32209 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-20 15:26:04 +00:00
John Blackbourn
d92cc07d91
Correctly set the post author in wp_xmlrpc_server::mw_editPost() when the current user is not the author of the post.
...
Props redsweater, markoheijnen, DrewAPicture
Fixes #24916
git-svn-id: https://develop.svn.wordpress.org/trunk@31983 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-02 15:48:41 +00:00