Commit Graph

750 Commits

Author SHA1 Message Date
Andrew Nacin 35688ccb89 Have wp_publish_post() wrap wp_insert_post() directly. see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21942 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 18:49:45 +00:00
Peter Westwood d86f9f140f Posting: Improve the invalid date protection code based on feedback from nacin.
* Introduce a wp_checkdate() function with a single filter to centralise the code that validates dates.
 * Improve the error message
 * Correctly handle the return value of wp_insert_post which is not always a WP_Error on failure

Fixes #17180


git-svn-id: https://develop.svn.wordpress.org/trunk@21922 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 10:46:50 +00:00
Peter Westwood 59dd4b7d2b Posting: Make it much harder to create posts with invalid dates by enforcing the post date tests in the UI and the backend code.
Previously you could quite easily send a new post into the back of beyond by specifying an invalid date like the 30th Feb and this was very confusing.
Sometimes it would seem to work and sometimes the post would end up very far in the past - depending on the mysql version and other factors.

Fixes #17180 props jkudish.


git-svn-id: https://develop.svn.wordpress.org/trunk@21921 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 21:43:35 +00:00
Andrew Nacin 9a0d9562a2 Use wp_get_theme()->get_page_templates() rather than get_page_templates() in wp_insert_post(),
to allow page template setting on the frontend without a fatal error. fixes #21755.



git-svn-id: https://develop.svn.wordpress.org/trunk@21847 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 18:36:08 +00:00
Andrew Nacin 0ce7f85ca4 Remove unused show_in_admin_all and single_view_cap from register_post_status(). props duck_. fixes #18972.
git-svn-id: https://develop.svn.wordpress.org/trunk@21846 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 18:02:23 +00:00
Andrew Nacin 5b132e4c24 In get_page_by_path(), attempt to return an item that has the same post type before returning an attachment with the same name. props SergeyBiryukov. tests in [UT1021]. fixes #15665.
git-svn-id: https://develop.svn.wordpress.org/trunk@21845 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 17:19:25 +00:00
Andrew Nacin 6d2fc0af91 If update_post_caches() does not receive a post type, glean post types from the individual post objects, rather than assuming 'post'. fixes #20177.
git-svn-id: https://develop.svn.wordpress.org/trunk@21844 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 16:26:05 +00:00
Andrew Nacin cb682a8b61 Allow supports => false to be passed to register_post_type() to disable the default title and editor.
An empty array may also disable all default features in the future.
Do not rely on this behavior: always specify title and editor if you want them.

props sc0ttkclark.
fixes #21586.



git-svn-id: https://develop.svn.wordpress.org/trunk@21831 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:02:39 +00:00
Andrew Nacin c1eaaf31b8 Always return upload directory information from wp_upload_dir(), even if there is an error. Append the error to the array. see #19235.
git-svn-id: https://develop.svn.wordpress.org/trunk@21822 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 22:06:49 +00:00
Andrew Nacin dfac91464f Remove AtomPub from core.
* Will be replaced with http://wordpress.org/extend/plugins/atom-publishing-protocol/.
 * Introduces an action, xmlrpc_rsd_apis, to add APIs to xmlrpc.php?rsd.
 * Introduces support for 'error' being 403 and 50x in class-wp.php.
 * Removes 'Remote Publishing' from Writing Settings (see [21804]). Keeps the remote_publishing settings section.

DB version is bumped to generate the new wp-app rewrite rule and remove the old enable_app option.

props wonderboymusic.
fixes #21509.



git-svn-id: https://develop.svn.wordpress.org/trunk@21818 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 20:11:39 +00:00
Ryan Boren 879cb8231b Remove unnecessary return by refs. Props wonderboymusic. fixes #21839
git-svn-id: https://develop.svn.wordpress.org/trunk@21792 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-10 17:00:11 +00:00
Andrew Nacin b489c2b242 Use wp_cache_add() in wp_mime_type_icon(). fixes #21835.
git-svn-id: https://develop.svn.wordpress.org/trunk@21783 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 21:10:43 +00:00
Daryl Koopersmith d539c11a94 Ensure $post_id is defined in wp_mime_type_icon() to prevent notices when a valid mime type string is provided. see #21835.
git-svn-id: https://develop.svn.wordpress.org/trunk@21782 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 21:04:58 +00:00
Ryan Boren 31ec698423 Use get_post() instead of global $post.
Make the $post argument to get_post() optional, defaulting to the current post in The Loop.

Props nacin
see #21309


git-svn-id: https://develop.svn.wordpress.org/trunk@21735 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 16:29:28 +00:00
Ryan Boren 31ae2c631a Simplify return from WP_Post::__get() now that references are no longer returned. see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@21655 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-29 13:42:11 +00:00
Ryan Boren a8e913063a Lose return ref from WP_Post::__get(). see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@21654 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-29 13:23:54 +00:00
Ryan Boren 01527025c9 Add tags_input, page_template, and post_category get magic to WP_Post.
Deprecate get_post_to_edit() and wp_get_single_post().
Props scribu
see #21309


git-svn-id: https://develop.svn.wordpress.org/trunk@21651 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-28 19:08:28 +00:00
Ryan Boren a94b94504a Use switch_to_blog()/restore_current_blog() in get_blog_post() and get_blog_permalink(). Eliminate the duplicate caching in these functions. Return WP_Post from get_blog_post(). Update phpdoc. Remove global-posts cache invalidation. Props jondavidjohn fixes #21595
git-svn-id: https://develop.svn.wordpress.org/trunk@21628 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-27 16:22:45 +00:00
Ryan Boren 338d0a103a Remove typo in phpdoc. see #21309 Props TobiasBg
git-svn-id: https://develop.svn.wordpress.org/trunk@21601 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-23 21:15:40 +00:00
Ryan Boren 9905abe697 Update phpdoc for functions that return WP_Post. Soft deprecate get_page(). see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@21598 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-23 20:34:41 +00:00
Ryan Boren de06b81360 Remove return ref from all calls to get_post()
Return WP_Post from get_default_post_to_edit()
Replace all calls to get_page() with get_post()
see #21309


git-svn-id: https://develop.svn.wordpress.org/trunk@21597 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-23 20:01:10 +00:00
Ryan Boren 83ea8767a5 Remove references from get_post() and get_page().
Handle $GLOBALS['post'] containing stdClass instead of WP_Post.
Props nacin
see #21309


git-svn-id: https://develop.svn.wordpress.org/trunk@21572 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-21 15:42:28 +00:00
Andrew Nacin 9143e2c860 Return a variable reference from get_pages(). see [21559], see #21309, fixes #20756.
git-svn-id: https://develop.svn.wordpress.org/trunk@21567 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-20 23:43:04 +00:00
Ryan Boren 30218d5ea5 Introduce WP_Post class. Clean up ancestors handling. Props scribu, toppa. fixes #10381 see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@21559 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-20 19:47:52 +00:00
Ryan Boren 962a3ff664 Reduce calls to sanitize_title_with_dashes in register_(post_type|taxonomy). Props ocean90. fixes #21600
git-svn-id: https://develop.svn.wordpress.org/trunk@21553 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-20 17:25:06 +00:00
Andrew Nacin beec541ae9 Always return a variable reference from get_pages(). props wonderboymusic, foxinni. fixes #20756.
git-svn-id: https://develop.svn.wordpress.org/trunk@21550 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-20 16:38:43 +00:00
Jon Cave 708d475b96 Remove unused arguments (hierarchical, _edit_link, capability_type) from register_post_status
Props scribu, simonwheatley. Fixes #18578, #18972.


git-svn-id: https://develop.svn.wordpress.org/trunk@21302 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-22 08:45:35 +00:00
Mark Jaquith ec527ab07d Clear the get_pages cache whenever ANY hierarchical post type cache is cleared — not just Pages. fixes #21279
git-svn-id: https://develop.svn.wordpress.org/trunk@21286 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-20 04:35:51 +00:00
Mark Jaquith 5ab7fcea5e Better image extension regexes, so we don't just grab the "jpe" from "jpeg" files in media_sideload_image(). props sivel. fixes #16693
git-svn-id: https://develop.svn.wordpress.org/trunk@21219 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-05 20:51:55 +00:00
Andrew Nacin d1270f0d77 Allow wp_update_post() to accept the same second argument as wp_insert_post(), allowing for WP_Error return values on failure. props scribu, mikeschinkel. fixes #15036.
git-svn-id: https://develop.svn.wordpress.org/trunk@21213 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-05 19:21:57 +00:00
Andrew Nacin a9643d617a Take the original slug passed into wp_unique_post_slug() and pass it to the wp_unique_post_slug filter. props johnbillion. fixes #20480.
git-svn-id: https://develop.svn.wordpress.org/trunk@21177 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-29 13:57:02 +00:00
Jon Cave ab22e8ed87 get_post_stati() returns post statuses not types. Props jeremyfelt. Fixes #20664.
git-svn-id: https://develop.svn.wordpress.org/trunk@20779 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-13 07:41:47 +00:00
Ryan Boren 9b8b0bffac Collect intermediate images before deleting an attachment and its meta. Fixes thumbnail deletion. Props SergeyBiryukov. fixes #20658
git-svn-id: https://develop.svn.wordpress.org/trunk@20770 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-11 18:47:32 +00:00
Ryan Boren 0de14403bf Don't delete nav menu items when the user that owns them is deleted.
* Introduce delete_with_user flag to register_post_type
* Set delete_with_user to false for the nav_menu_item post type
* Set it to true for all other core post types
* If delete_with_user is not set, fallback to post_type_supports('author')

Props nacin
Fixes #16358


git-svn-id: https://develop.svn.wordpress.org/trunk@20739 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-08 17:01:50 +00:00
Ryan Boren a38242a366 phpdoc updates for register_post_type(). Props jeremyfelt. fixes #20622
git-svn-id: https://develop.svn.wordpress.org/trunk@20734 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-07 16:25:06 +00:00
Ryan Boren 76c1cad16a phpdoc fix for register_post_status(). Props yoavf. fixes #20616
git-svn-id: https://develop.svn.wordpress.org/trunk@20726 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-05 19:04:34 +00:00
Andrew Nacin 5f902262d1 Return false in get_attached_file() when the file does not exist, rather than a path to the base uploads directory. props mikeschinkel. fixes #18855.
git-svn-id: https://develop.svn.wordpress.org/trunk@20613 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-27 16:08:58 +00:00
Jon Cave 83a3cc73df Accept a post object in clean_post_cache(). Fixes #20486.
The post_type can then be accessed to properly clean the taxonomy relationships cache.
The full object is useful in situations when an ID might reference a post that has been
removed from the database (e.g. wp_delete_post()).


git-svn-id: https://develop.svn.wordpress.org/trunk@20569 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-23 22:04:35 +00:00
Jon Cave 7953f9e753 Fix typo and terminology in Twenty Eleven's header template. Props JarretC. Fixes #20442.
git-svn-id: https://develop.svn.wordpress.org/trunk@20465 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-14 19:02:04 +00:00
Ryan Boren d1100bacb4 Schedule auto-draft deletion from post-new.php instead of from admin.php. This provides better throttling for large multisite installs and reduces the risk of a delete avalanche.
fixes #19663


git-svn-id: https://develop.svn.wordpress.org/trunk@20453 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-12 18:49:48 +00:00
Andrew Nacin 1909f3fbeb Use the metadata API rather than raw queries and direct do_action calls. see #20417.
git-svn-id: https://develop.svn.wordpress.org/trunk@20435 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-11 20:02:39 +00:00
Ryan Boren 27592057cd Pass post_type to clean_post_cache() instead of attempting to fetch a post object since the post may have been deleted.
Props leewillis77
see #19690


git-svn-id: https://develop.svn.wordpress.org/trunk@20423 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-10 16:09:44 +00:00
Andrew Nacin 54a6a40533 Introduce $wpdb->delete(). props justindgivens, scribu. fixes #18948.
git-svn-id: https://develop.svn.wordpress.org/trunk@20287 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-24 15:24:31 +00:00
Peter Westwood a42caf87b4 XMLRPC: Add new wp.getPostType and wp.getPostTypes apis. See #18436 props maxcutler, markoheijnen and nprasath002.
git-svn-id: https://develop.svn.wordpress.org/trunk@20271 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-23 17:53:14 +00:00
Ryan Boren 83604c7fbb Don't generate a query when the all_page_ids cache is an empty array. An empty array is a valid cache value when no pages are present. Avoids a useless query for sites with no pages. Props andy. see #20236
git-svn-id: https://develop.svn.wordpress.org/trunk@20216 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 19:09:03 +00:00
Jon Cave 3790d70d28 Use return value of update_post_meta() in set_post_thumbnail() instead of always returning true. Props webord. Fixes #20218.
git-svn-id: https://develop.svn.wordpress.org/trunk@20172 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-14 09:48:57 +00:00
Ryan Boren 1a41092158 Call _get_post_ancestors() from get_post_ancestors() if the ancestors property is not set in the post object. Works around situations where ancestors is not set in the cached version of the post object. see #18536
git-svn-id: https://develop.svn.wordpress.org/trunk@20171 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-12 18:23:48 +00:00
Peter Westwood 157ffb3f85 XMLRPC: Expose the extended more text to XMLRPC clients from metaWeblog.getPost(). Fixes #10933 props koke, ericmann.
git-svn-id: https://develop.svn.wordpress.org/trunk@20156 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-08 12:50:21 +00:00
Andrew Nacin 11fd4b45c0 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: https://develop.svn.wordpress.org/trunk@20075 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-02 18:56:54 +00:00
Jon Cave cafa8dab24 Reduce references to the $wp_rewrite global because it's no longer used or a wrapper function can be used instead. Fixes #14546.#14546.
git-svn-id: https://develop.svn.wordpress.org/trunk@20023 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 20:29:33 +00:00
Ryan Boren 2c83196cff Update phpdoc for wp_mime_type_icon(). Props SergeyBiryukov, mitchoyoshitaka. fixes #16604
git-svn-id: https://develop.svn.wordpress.org/trunk@19924 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-14 18:12:01 +00:00
Ryan Boren 021c55798e Split the main WP_Query posts query into two queries to avoid temp tables. Leverage cache to avoid second query in persistent cache environments. Props scribu, cheald, prettyboymp. see #18536
git-svn-id: https://develop.svn.wordpress.org/trunk@19918 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-14 15:09:35 +00:00
Andrew Nacin 52838cbf4d Docs, see ##19882.
git-svn-id: https://develop.svn.wordpress.org/trunk@19910 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-10 22:49:56 +00:00
Andrew Nacin c8f498046f Allow get_post_meta() to be called with only a post ID, as get_metadata() handles this. props scribu, fixes #19882.
git-svn-id: https://develop.svn.wordpress.org/trunk@19908 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-10 22:42:54 +00:00
Jon Cave dd9c09eff5 Make get_post_custom() a wrapper of get_post_meta() so that it works when cache addition is suspended and to simplify it.
Props leewillis77 for the initial patch. Fixes #19708.


git-svn-id: https://develop.svn.wordpress.org/trunk@19906 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-10 22:00:37 +00:00
Andrew Nacin 092808ead8 Allow localized commas to be used as tag separators. see #7897.
git-svn-id: https://develop.svn.wordpress.org/trunk@19853 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-07 18:06:12 +00:00
Jon Cave 6a7fe5b25c Use new $args parameter for (WP_Rewrite::)add_permastruct(). Fixes #16092.
Use array_intersect_key() to keep WP_Rewrite::$extra_permastructs free of unnecessary/unknown keys + values.


git-svn-id: https://develop.svn.wordpress.org/trunk@19779 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-28 21:00:59 +00:00
Andrew Nacin 838bb8c0c5 s/parem/param/. props Latz. fixes #19823.
git-svn-id: https://develop.svn.wordpress.org/trunk@19744 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-24 21:52:49 +00:00
Andrew Nacin 05d413f123 Args is an object, not an array. props duck_, aaroncampbell. see #19275.
git-svn-id: https://develop.svn.wordpress.org/trunk@19740 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-23 19:32:39 +00:00
Andrew Nacin 8900888567 Add 'ep_mask' as an argument to the 'rewrite' array for register_post_type() and register_taxonomy(). Keeps 'permalink_epmask' compatible as an argument for post type registrations. Fixes endpoints for category and tag pages. fixes #19275.
git-svn-id: https://develop.svn.wordpress.org/trunk@19738 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-23 19:12:04 +00:00
Jon Cave d2306a693b Update hierarchy for all hierarchical post types when deleting a parent post, not just for pages. Fixes #19637.
git-svn-id: https://develop.svn.wordpress.org/trunk@19734 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-13 18:37:46 +00:00
Ryan Boren 285247786e Use wp_cache_add() instead of wp_cache_set() when priming the object term cache in update_object_term_cache(). Pass the real post_type to clean_object_term_cache() instead of hard-coding post. Call clean_object_term_cache() from clean_bookmark_cache(). Props leewillis77. fixes #19690
git-svn-id: https://develop.svn.wordpress.org/trunk@19729 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-11 21:26:18 +00:00
Jon Cave 148329fecb Rewrite rules don't need to be flushed on every page save/delete as they're no longer verbose. Fixes #19636.
git-svn-id: https://develop.svn.wordpress.org/trunk@19727 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-10 22:55:38 +00:00
Jon Cave 156048ca52 split was deprecated in PHP 5.3.0, so use explode instead. Props garyc40. Fixes #16325.
git-svn-id: https://develop.svn.wordpress.org/trunk@19726 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-09 21:20:51 +00:00
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +00:00
Jon Cave 760471a9a8 Fix mistakes in parameter documentation and add some missing param docs. See #19756.
git-svn-id: https://develop.svn.wordpress.org/trunk@19702 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-06 18:31:43 +00:00
Ryan Boren 5e76729992 One newline is enough.
git-svn-id: https://develop.svn.wordpress.org/trunk@19684 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-05 20:10:39 +00:00
Ryan Boren 0f2274ee75 Introduce sanitize_trackback_urls(). Don't ping bad urls. Don't ping bad urls or save them to the DB. Props xknown, SergeyBiryukov. fixes #17560
git-svn-id: https://develop.svn.wordpress.org/trunk@19675 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-04 19:45:13 +00:00
Ryan Boren 676ba7043e Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: https://develop.svn.wordpress.org/trunk@19593 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-13 23:45:31 +00:00
Dion Hulse d70ddc49f9 Switch to sanitize_title_for_query() for Query sanitization (allows for pre-3.3 page slugs to be viewable), Don't update page slugs to new slug-types when the slug is not being changed, Don't issue a XHR if the page slug hasn't changed. Group effort props xknown, markjaquith, nacin. See #19292
git-svn-id: https://develop.svn.wordpress.org/trunk@19444 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-24 00:20:21 +00:00
Andrew Nacin 88b1b11435 Only enforce content/title/excerpt requirement in wp_insert_post() if the post type supports all three. Add a filter to allow this to be modified. fixes #18713.
git-svn-id: https://develop.svn.wordpress.org/trunk@19305 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-15 21:19:29 +00:00
Jon Cave 9c824b6687 Don't pass $post_type as get_page()'s $filter argument. Copy-and-paste error. Removal improves get_page_by_path() performance dramatically by stopping sanitize_post() being called. Fixes #19175.
git-svn-id: https://develop.svn.wordpress.org/trunk@19283 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-14 21:32:56 +00:00
Dion Hulse 522f890c32 Fix typo in [19231]. See #17579
git-svn-id: https://develop.svn.wordpress.org/trunk@19234 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-09 22:13:35 +00:00
Andrew Nacin f3ba249747 Check post type and bail earlier in wp_get_attachment_url(). props mitchoyoshitaka, fixes #17579.
git-svn-id: https://develop.svn.wordpress.org/trunk@19231 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-09 19:20:33 +00:00
Andrew Nacin 057afbb44b Don't set post_type QV in _post_format_request() when we're in the admin. props ethitter. fixes #18475.
git-svn-id: https://develop.svn.wordpress.org/trunk@19193 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-06 21:15:23 +00:00
Jon Cave 479b59bdb0 Return full WHERE clause from get_posts_by_author_sql() if the post type isn't registerd. Fixes SQL sytax on users list when 'post' is unregistered. Fixes #19116.
git-svn-id: https://develop.svn.wordpress.org/trunk@19117 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-02 17:06:34 +00:00
Ryan Boren 4399cf7610 Avoid E_STRICT notices. see #18975
git-svn-id: https://develop.svn.wordpress.org/trunk@19094 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-31 19:38:46 +00:00
Ryan Boren a3f2a7ce55 Fix notices and logic errors in get_page_by_path(). Props duck_. see #17670
git-svn-id: https://develop.svn.wordpress.org/trunk@19075 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-28 19:32:19 +00:00
Ryan Boren fd10e500e4 Pinking shears
git-svn-id: https://develop.svn.wordpress.org/trunk@19054 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-24 19:13:23 +00:00
Andrew Nacin 0853bf3d40 Correct docs for get_post_field(). props JustinSainton, fixes #19025.
git-svn-id: https://develop.svn.wordpress.org/trunk@19034 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-21 17:13:26 +00:00
Ryan Boren df5f69fabc In wp_trash_post(), rename the trash_post action to wp_trash_post to avoid collision with the wp_transition_post_status() trash_post state transition. Props SergeyBiryukov. fixes #15628
git-svn-id: https://develop.svn.wordpress.org/trunk@18974 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-14 18:39:31 +00:00
Ryan Boren 448700b2e7 Count only published posts when updating term counts. Fire term count updates on transition_post_status. Props joehoyle. see #17548
git-svn-id: https://develop.svn.wordpress.org/trunk@18932 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-10 20:52:44 +00:00
Ryan Boren c3212d522e Avoid refetching a post in get_post() when passed a post object that has already been raw sanitized. Clean up sanitize loop. Props scribu. fixes #18822
git-svn-id: https://develop.svn.wordpress.org/trunk@18846 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-30 19:06:18 +00:00
Ryan Boren 2678fd4f60 Restore sorting by post_name in get_pages(). Props SergeyBiryukov. fixes #18805
git-svn-id: https://develop.svn.wordpress.org/trunk@18845 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-30 18:12:14 +00:00
Peter Westwood 2421e0ecc6 Fire an action when a post type or taxonomy is registered so plugins can react. Fixes #18802 props simonwheatley.
git-svn-id: https://develop.svn.wordpress.org/trunk@18833 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-30 09:53:35 +00:00
Andrew Ozz b969d2ea80 Clean up remnants from having negative Post_IDs, props markjaquith, fixes #18235
git-svn-id: https://develop.svn.wordpress.org/trunk@18823 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 21:47:52 +00:00
Andrew Nacin cd0ad3ead4 Revert [18783], as it breaks term relationship counts for attachment taxonomies. see #17548.
git-svn-id: https://develop.svn.wordpress.org/trunk@18809 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 05:29:20 +00:00
Ryan Boren f63662aa82 Count only published posts when updating term counts. Fire term count updates on transition_post_status. Props joehoyle. fixes #17548
git-svn-id: https://develop.svn.wordpress.org/trunk@18783 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-26 22:24:46 +00:00
Andrew Nacin 0f4a1e5e3c delete_post_thumbnail(). props CoenJacobs, duck_. fixes #17895.
git-svn-id: https://develop.svn.wordpress.org/trunk@18767 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-24 19:31:38 +00:00
Jon Cave b60222700e Documentation fixes. See #18560.
- Add missing parameters
 - Add missing @param data types
 - s/format_where/where_format/


git-svn-id: https://develop.svn.wordpress.org/trunk@18753 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-22 12:02:31 +00:00
Ryan Boren 9651a4b5b0 Don't send page slugs through prepare() to avoid breaking octets in i18n page slugs. Props SergeyBiryukov. see #10249 #166687
git-svn-id: https://develop.svn.wordpress.org/trunk@18652 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-08 17:17:17 +00:00
Jon Cave 82c0f09c09 Fix typos in documentation (wp-includes/[i-z]). See #18560.
git-svn-id: https://develop.svn.wordpress.org/trunk@18639 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-05 19:08:15 +00:00
Mark Jaquith 8094c89b39 Cast to array in get_page_by_path() foreach
git-svn-id: https://develop.svn.wordpress.org/trunk@18627 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-31 06:46:16 +00:00
Dion Hulse c370cd58f1 Display 'Edit Media' instead of 'Edit Post' for Attachments/Media in the admin bar. Props johnbillion. Fixes #18529
git-svn-id: https://develop.svn.wordpress.org/trunk@18613 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-28 03:39:06 +00:00
Peter Westwood 0c6d0349f4 Add a general filter to wp_unique_post_slug to allow for full customisation of the uniqueness functionality. Fixes #14111.
git-svn-id: https://develop.svn.wordpress.org/trunk@18546 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-13 21:00:24 +00:00
Mark Jaquith 48d294e7ea Eliminate verbose rewrite rules for ambiguous rewrite structures, resulting in massive performance gains. props andy, otto42, duck_. Nice work everyone! see #16687
git-svn-id: https://develop.svn.wordpress.org/trunk@18541 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-12 01:55:08 +00:00
Ryan Boren eda7d43e85 Deprecate get_userdatabylogin() and get_user_by_email(). Props scribu. fixes #18333
git-svn-id: https://develop.svn.wordpress.org/trunk@18513 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-05 16:57:31 +00:00
Ryan Boren dbb0b7c8d6 Turn delete_meta() , get_post_meta_by_id(), update_meta(), delete_post_meta_by_key() into wrappers around the metadata API. Add back compat *_postmeta actions to metadata API. Props jgadbois. see #18196
git-svn-id: https://develop.svn.wordpress.org/trunk@18500 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-03 16:48:37 +00:00
Ryan Boren 431cc66a5f phpdoc for all_items and menu_name. Props ocean90. fixes #18036
git-svn-id: https://develop.svn.wordpress.org/trunk@18472 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-26 21:31:36 +00:00
Ryan Boren f39604511e Fix CPT rewrite generation when turning on permalinks. Props andy. see #18040 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@18443 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-15 15:49:42 +00:00