Commit Graph

78 Commits

Author SHA1 Message Date
westi
65e8cf47ed XMLRPC: Make sure that we always return valid dates when no date is currently set - for example if the post is pending. Fixes #19733 props markoheijnen and koke.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-04 21:32:28 +00:00
westi
4b31ce3cd2 XMLRPC: Add a check in mw.newPost to stop the authorID being changed to an invalid value. Fixes #20356 props maxcutler.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-04 20:11:21 +00:00
westi
1e62ff3689 XMLRPC: In mw_newPost check to see if the post_status has been supplied before trying to use it to avoid undefined array access notices. Fixes #19774 props maxcutler.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 13:13:13 +00:00
westi
fabdd204c0 XMLRPC: Fix bugs in mw_editPost hilighted by tests in [UT593]
* Feature image code did not actually set the feature image - See #18429
 * This api call could trash post data - Fixes #20321.


git-svn-id: http://svn.automattic.com/wordpress/trunk@20322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 11:59:51 +00:00
westi
944af3e88b XMLRPC: Fix the featured image support in mw_newPost to use the correct variable names. See #18429 and [UT592].
git-svn-id: http://svn.automattic.com/wordpress/trunk@20321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 11:06:17 +00:00
westi
d744ca66f0 XMLRPC: Add the object ID to the return data of wp.uploadFile/metaWeblog.newMediaObject so that it can be used in other api calls e.g. setting featured image see #15098 props maxcutler
git-svn-id: http://svn.automattic.com/wordpress/trunk@20305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-28 12:00:50 +00:00
westi
79ff94923e XMLRPC: Add new wp.getPostType and wp.getPostTypes apis. See #18436 props maxcutler, markoheijnen and nprasath002.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-23 17:53:14 +00:00
westi
4d68261f5e XMLRPC: Add support for Feature Images to the new wp.xxxPost apis. See #18429 props maxcutler and markoheijen.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-23 15:35:44 +00:00
ryan
7faddb72bc Consolidate some strings. Props ramiy. see #20216
git-svn-id: http://svn.automattic.com/wordpress/trunk@20215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 19:04:49 +00:00
westi
eb04dc7d8d XMLRPC: Start casting datatypes in _prepare_term so as to ensure consistent datatypes in our responses. See #18438.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 13:31:32 +00:00
westi
bb4d8c73a5 XMLRPC: Add some xmlrpc_call_success_* actions to some of the post creation/deletion calls. Fixes #14283 props ericmann, simonwheatley.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 13:16:26 +00:00
westi
7834e57a80 XMLRPC: Add some xmlrpc_call_success_* actions to some of the credit/edit/delete calls. Fixes #17109 props ericmann.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 13:12:06 +00:00
westi
787d4acef5 XMLRPC: Expose the extended more text to XMLRPC clients from metaWeblog.getPost(). Fixes #10933 props koke, ericmann.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 12:50:21 +00:00
westi
d1e336dee2 XMLRPC: Expose the fact that the current theme supports featured images to XMLRPC clients so they can make intelligent UI decisions.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 12:19:45 +00:00
westi
ba2a634b7c XMLRPC: Remove the "Backward Compatibility" code from the new api as we don't need to support this older format and it keeps the new api cleaner.
The new Posts API is designed so that you can fetch a post with get, update the data structure returned and submit that with edit and so we need to ensure to only include in get data in a single form - tags and categories are returned as terms.
See #18429


git-svn-id: http://svn.automattic.com/wordpress/trunk@20154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 11:24:43 +00:00
westi
2281ba2229 XMLRPC: Intoduce a date generation helper method to improve the dates returned over XMLRPC when we have a 0 date stored for drafts.
This improves the ability of clients to work with the new wp Post APIs. See #18429 and #19733 props maxcutler. 


git-svn-id: http://svn.automattic.com/wordpress/trunk@20153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 11:19:53 +00:00
westi
3bc5eff6d3 XML-RPC: Initial implementation of Taxonomy and Term APIs.
Implements: wp.newTerm, wp.editTerm, wp.deleteTerm, wp.getTerm, wp.getTerms, wp.getTaxonomy and wp.getTaxonomies

See: #18438, #18439, #18440, #18441, #18442, #18443, and #18444 props maxcutler, markoheijnen and nprasath002.


git-svn-id: http://svn.automattic.com/wordpress/trunk@20137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-07 17:02:22 +00:00
nacin
ae8af5d0dd Introduce get_page_template_slug( $id = null ) to return a page's template (like "showcase.php"). Returns false if post ID is not a page, and an empty string for the default page template. Use the function across core. props billerickson for initial patch. fixes #18750.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-02 18:56:54 +00:00
nacin
73938cd0a9 We indent with tabs, but align with spaces.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-02 18:06:30 +00:00
nacin
31223d73ed Add template and stylesheet to readonly options that can be pulled from XML-RPC. props koke, ericmann. see #17132.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-02 17:59:47 +00:00
ryan
d910c26182 Pinking shears 6-20000
git-svn-id: http://svn.automattic.com/wordpress/trunk@20000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-27 19:46:52 +00:00
nacin
aefde50081 Deprecate ancient "debugging" tools.
* logIO() and the global $xmlrpc_logging in XML-RPC.
 * log_app() and the global $app_logging in APP.
 * debug_fwrite(), debug_fopen(), debug_fclose(), and $debug.
see #20051.



git-svn-id: http://svn.automattic.com/wordpress/trunk@19935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-17 00:02:42 +00:00
ryan
6158ce7244 Disallow changing the post type in mw_editPost(). see #18429
git-svn-id: http://svn.automattic.com/wordpress/trunk@19914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-13 21:01:55 +00:00
ryan
a856f757db Remove unnecessary cap check in wp_newPage(). mw_newPost() will handle it. Props nprasath002. fixes #19981
git-svn-id: http://svn.automattic.com/wordpress/trunk@19905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-10 20:49:27 +00:00
josephscott
bd6038ce1a Provide the attachment_id of a media item in the XML-RPC call wp.getMediaItem.
Props skithund
Fixes #18683


git-svn-id: http://svn.automattic.com/wordpress/trunk@19885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 23:32:25 +00:00
josephscott
d116969cef Expose image_default_link_type, image_default_size, and image_default_align
options via XML-RPC

Props koke
Fixes #18126


git-svn-id: http://svn.automattic.com/wordpress/trunk@19884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 23:28:23 +00:00
josephscott
ce4e3dc47b Expose the post modified date (in blog TZ and GMT) via XML-RPC
Props ocollet
Fixes #19027


git-svn-id: http://svn.automattic.com/wordpress/trunk@19883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 23:25:11 +00:00
nacin
a0ec80fff3 Combine two strings. props kenan3008, see #18429.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 18:50:25 +00:00
ryan
391fd7003d s/_wp_insertPost/_insert_post/. Helper funcs should follow core rather than xmlrpc style. see #18429
git-svn-id: http://svn.automattic.com/wordpress/trunk@19873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 17:00:19 +00:00
ryan
4c3c859461 Formatting cleanup. see #18429
git-svn-id: http://svn.automattic.com/wordpress/trunk@19869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 16:04:58 +00:00
duck_
357fc30771 Mark wp_editPost() documentation as docblock. See #18429.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 16:03:31 +00:00
ryan
7a136d0bf9 Simplify cap checking. Props nprasath002. see #18429
git-svn-id: http://svn.automattic.com/wordpress/trunk@19867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 15:40:26 +00:00
ryan
afcce70613 Space between if and open paren
git-svn-id: http://svn.automattic.com/wordpress/trunk@19864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-08 14:54:15 +00:00
westi
4cb4acb372 XMLRPC: Introduce new create,read,update and delete XMLRPC apis for Posts, Pages and all Custom Post Types.
Introduces: wp.newPost, wp.editPost, wp.deletePost, wp.getPost, and wp.getPosts
See #18429, #18430, #18431, #18432, and #18433 props maxcutler and markoheijnen.


git-svn-id: http://svn.automattic.com/wordpress/trunk@19848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-07 11:33:39 +00:00
duck_
81a7ad2c81 split was deprecated in PHP 5.3.0, so use explode instead. Props garyc40. Fixes #16325.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-09 21:20:51 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
nacin
01736fb650 Expose default_ping_status and default_comment_status via XML-RPC. props daniloercoli. fixes #18566.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-07 19:08:48 +00:00
ryan
83b131f8e3 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: http://svn.automattic.com/wordpress/trunk@19687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:50:54 +00:00
ryan
616c35e71c One newline is enough.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:10:39 +00:00
ryan
07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
ryan
d8892db612 Cast author IDs to strings. Props yoavf. fixes #18869
git-svn-id: http://svn.automattic.com/wordpress/trunk@19071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-27 18:36:49 +00:00
josephscott
d6a835521f Follow the pattern of wp-admin a bit more for metaWeblog.newPost by using get_default_post_to_edit() to generate a post ID before the post is actually published.
Fixes #18812
Props koke, nacin


git-svn-id: http://svn.automattic.com/wordpress/trunk@18933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-10 21:27:05 +00:00
duck_
e4ed63fc6f Fix typos in documentation (wp-includes/[a-h]). See #18560.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-03 16:02:41 +00:00
nacin
3ee964c10c Check for comment existence before checking edit_comment meta cap. props xknown, fixes #18104.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-23 10:22:34 +00:00
ryan
852627fc48 Use *_metadata_by_mid() API in set_custom_fields(). Handle slashing when checking caps for key. see #18195
git-svn-id: http://svn.automattic.com/wordpress/trunk@18501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-03 18:20:15 +00:00
ryan
4ad0954961 Introduce register_meta(), get_metadata_by_mid(), and *_post_meta capabilities. fixes #17850
git-svn-id: http://svn.automattic.com/wordpress/trunk@18445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-07-20 22:04:35 +00:00
ryan
daa14c36f9 Bring out the pinking shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-10 23:01:45 +00:00
ryan
d92ecb674e Revert [17663]. fixes #17131
git-svn-id: http://svn.automattic.com/wordpress/trunk@18119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-02 20:03:27 +00:00
ryan
a972403a40 Use static strings. Props niallkennedy. fixes #17169
git-svn-id: http://svn.automattic.com/wordpress/trunk@17823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-06 19:51:47 +00:00
ryan
04487fc268 Constructor cleanup. Props ocean90. fixes #16768
git-svn-id: http://svn.automattic.com/wordpress/trunk@17771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-29 20:05:12 +00:00