Commit Graph

655 Commits

Author SHA1 Message Date
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