Drew Jaynes
0cb7c0bd9f
Docs: Add missing descriptions for the $wpdb global in DocBlocks all the places.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35170 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-14 23:43:10 +00:00
Scott Taylor
02804492e3
XML-RPC: allow wp_xmlrpc_server::wp_getPosts() to receive s as a filter.
...
Props chriscct7.
Fixes #25406 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34860 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-06 13:40:09 +00:00
Sergey Biryukov
ef1a428bd5
Merge some strings with the same meaning in wp-includes/class-wp-xmlrpc-server.php.
...
Props pavelevap.
Fixes #33644 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34798 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 14:08:43 +00:00
Scott Taylor
948ab018d2
XML-RPC: calculate the proper offset for GMT in wp.newPost, mw.newPost, and mw.editPost when post_date is set, wp.editComment when comment_date is set. post|comment_date is assumed to be GMT. This is only true if the timezone string for the site matches GMT.
...
Adds unit tests for each.
Props smerriman, justdaiv, wonderboymusic.
Fixes #30429 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34681 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 04:04:16 +00:00
Scott Taylor
591b743362
After [34577], alter wp_xmlrpc_server::mw_newMediaObject() to check upload space in multisite.
...
See #21292 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34603 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 19:48:57 +00:00
Scott Taylor
881808bb11
XML-RPC: in wp_xmlrpc_server::wp_editTerm(), check ! empty when applying parent logic.
...
Adds unit tests.
Props hrishiv90, markoheijnen, sam2kb.
Fixes #21977 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34580 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 05:30:34 +00:00
Scott Taylor
90ad5546d5
XML-RPC: upgrade the resposnse ofwp_xmlrpc_server::mw_newMediaObject() based on work down in 3.4 so that it runs the struct through ->_prepare_media_item().
...
Props markoheijnen.
Fixes #6430 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34579 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 05:14:08 +00:00
Scott Taylor
20020ebf2b
XML-RPC: move the malfunctioning 'overwrite' code from wp_xmlrpc_server::mw_newMediaObject(). This was suggested 3 years ago.
...
Props markoheijnen.
Fixes #17604 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34578 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 05:02:24 +00:00
Scott Taylor
69f20d3c4b
XML-RPC: In wp_xmlrpc_server::wp_getComments(), allow post_type to be passed as part of $struct.
...
Props nprasath002.
Fixes #20026 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34575 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 04:44:51 +00:00
Scott Taylor
0cafccfb32
XML-RPC: In wp_xmlrpc_server::wp_getUsersBlogs(), return the isPrimary flag for each blog.
...
Props SergeyBiryukov, daniloercoli.
Fixes #25958 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34574 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 04:34:50 +00:00
Scott Taylor
95a810258c
XML-RPC: In wp_xmlrpc_server::blogger_editPost(), make use of the $publish arg (the 6th arg passed to the method) to specify publish or draft. Restores the arg, which I removed in [31092], because it was unused cruft.
...
Props mdawaffe.
Fixes #10764 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34573 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 04:00:32 +00:00
Scott Taylor
9cf6b6f2d0
XML-RPC: In wp_xmlrpc_server::mw_newPost(), if $dateCreated is not set, don't set post_date and post_date_gmt. It calls wp_insert_post(), which will handle it correctly. The problem was drafts being created and GMT date being set. It shouldn't be.
...
Adds unit test.
Fixes #16985 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34572 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 03:37:53 +00:00
Scott Taylor
0d3da57a9a
XML-RPC: wp.getComments should be allowed to return approved comments to those without the 'moderate_comments' cap.
...
Adds (rewrites) unit tests from 4 years ago that we never committed because....
Props wonderboymusic, koke, ericmann, nprasath002.
Fixes #17981 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34570 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 02:48:47 +00:00
Scott Taylor
a9e30d8e94
XML-RPC: Introduce the concept of unit testing to wp_xmlrpc_server::wp_newComment():
...
* Don't allow comments to be created for posts that have `comment_status` set to `'closed'`
* Set some magic props on `WP_User` to vars before passing them to `wp_xmlrpc_server::escape()`
Props wonderboymusic, jesin.
Fixes #27471 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34559 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 20:19:19 +00:00
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