Ryan Boren
2c8fd31155
Pass a term object to the delete_term actions. Props bigdawggi. fixes #20645
...
git-svn-id: https://develop.svn.wordpress.org/trunk@21939 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 13:27:56 +00:00
Andrew Nacin
2815798357
Make WP_Tax_Query::transform_query() public. props scribu. fixes #21684 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@21863 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-15 20:17:03 +00:00
Andrew Nacin
c1d96d72b4
Update docs to reflect that wp_count_terms() can return WP_Error when the taxonomy does not exist. props SergeyBiryukov, fixes #21888 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@21843 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 16:11:30 +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
bcf58b34c4
Allow easy registration of taxonomy columns on post (and custom post type) list table screens.
...
To register a column for a list table, use the new manage_taxonomies_for_{$post_type}_columns
filter. Introduces show_admin_column => true for register_taxonomy(), which automatically
displays that column on all associated post types.
props jtsternberg, SergeyBiryukov for initial patches.
fixes #21240 .
git-svn-id: https://develop.svn.wordpress.org/trunk@21788 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-08 03:18:36 +00:00
Ryan Boren
2bebcee04f
Return WP_Error if the db insert in wp_set_object_terms() fails. Props jndetlefsen. fixes #21800
...
git-svn-id: https://develop.svn.wordpress.org/trunk@21766 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 17:57:53 +00:00
Andrew Nacin
f8b0fb06fe
Validate $order in wp_get_object_terms(). props duck_.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@21758 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 01:23:53 +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
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
56dd6e86a3
Add term_taxonomy_id field handling to WP_Tax_Query::transform_query(), allowing the transformation to be bypassed when tt ids are passed.
...
props wonderboymusic.
fixes #21228 .
git-svn-id: https://develop.svn.wordpress.org/trunk@21552 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-20 16:49:21 +00:00
Andrew Nacin
9931c1a45d
Hide the link manager from the UI on upgrade, if the site has no links. New DB option, link_manager_enabled.
...
Enforce this by denying the 'manage_links' capability, which hides the All Links, Add New Link, and Link Categories screens. Hide WP_Widget_Links and the UI for the default_link_category as well.
Convert all references to 'posts and links' when handling reassignment on user deletion to just 'posts'.
see #21307 .
git-svn-id: https://develop.svn.wordpress.org/trunk@21501 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-13 16:18:42 +00:00
Ryan Boren
585d42c273
Consolodate some strings. Props pavelevap. fixes #20809
...
git-svn-id: https://develop.svn.wordpress.org/trunk@20972 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-01 19:05:30 +00:00
Andrew Nacin
beac0e2e0f
Add view_item to the phpdoc for get_taxonomy_labels(). props Caspie. fixes #20406 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@20436 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-11 20:08:30 +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
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
Jon Cave
5fcb582c25
Stop invalid SQL syntax by bailing from wp_get_object_terms() if $object_ids or $taxonomies is empty. Props batmoo. Fixes #19952 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19975 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-21 20:20:50 +00:00
Jon Cave
35eae452e8
Taxonomy rewrite generation when turning on permalinks, r18443 for taxonomies. Props SergeyBiryukov. Fixes #19794 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19930 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-15 17:30:37 +00:00
Jon Cave
a60932bf66
Post formats should show_in_nav_menus when the current theme supports them. Props filosofo, nacin. Fixes #16390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19876 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-08 17:12:02 +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
28cfc3cd49
Correct logic inversion. #19275 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19742 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-23 20:10:01 +00:00
Andrew Nacin
7140ded1cc
Clean up and better document create_initial_taxonomies(). see #19275 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19741 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-23 19:58:26 +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
Ryan Boren
77958da0d2
Update register_taxonomy_for_object_type() phpdoc to reflect that the post_type must be a string only, no arrays allowed. Props transom. fixes #19795
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19730 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-11 21:39:01 +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
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
3e9c3dbed6
Introduce term_is_ancestor_of(). Finish taxonomy support for wp_insert_category(). Props garyc40. fixes #15581
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19678 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-04 22:44:19 +00:00
Andrew Nacin
bb574e4d80
term_exists() @return correction. props johnbillion, fixes #19565 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19600 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-16 20:56:14 +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
Ryan Boren
813f1abd3c
Avoid undefined index notices. Props SergeyBiryukov, valendesigns. fixes #18455
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19077 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-28 19:52:14 +00:00
Andrew Nacin
95eff833c8
Remove duplicate word in docs. props SergeyBiryukov, fixes #18986 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19065 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-25 16:07:14 +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
5e85a49355
Update the update_count_callback docs. see #18986 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19037 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-21 21:50:36 +00:00
Andrew Nacin
8e97202178
No need to specify an update_count_callback for categories or tags, as the default handler for them will now be _update_post_term_count(). see #18986 , [19035].
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19036 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-21 21:46:03 +00:00
Andrew Nacin
5307ec17c5
Separate non-post term counting from _update_post_term_count(). Introduce _update_generic_term_count(). The generic handler will be the default whenever the taxonomy is attached to an object type other than a post type (link, user). Otherwise the _update_post_term_count() handler will be the default. fixes #18986 . see #17548 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19035 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-21 21:38:14 +00:00
Ryan Boren
b9215e193e
Typo fix. Props SergeyBiryukov. see #18986
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19031 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-20 21:41:54 +00:00
Ryan Boren
f4d5f4fceb
Fix term counting for links. Props SergeyBiryukov. fixes #18986
...
git-svn-id: https://develop.svn.wordpress.org/trunk@19025 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-20 14:28:26 +00:00
Ryan Boren
cc9e6ecb65
Call wp_update_term_count() only for those terms that have been added to or removed from the object. Props jeremyclarke. fixes #18631
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18999 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-18 21:01:55 +00:00
Andrew Nacin
90f95e0204
new does not require by reference.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18995 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-18 20:20:59 +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
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 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
fb58d06f1c
Rename 'Post Tags' to 'Tags'. props scribu, fixes #17683 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18661 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-11 17:52:46 +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
Ryan Boren
ad3b0cacc4
Support fields = slugs in wp_get_object_terms(). Props lancewillett, SergeyBiryukov. fixes #15835
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18603 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-25 18:49:46 +00:00
Peter Westwood
89a6ae387e
Optimise get_term to not query for term_id = 0. Also improve the prepared query to use %d for the term_id.
...
Fixes #18076 props mdawaffe.
git-svn-id: https://develop.svn.wordpress.org/trunk@18591 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-24 10:39:52 +00:00
Ryan Boren
bb7af108f5
Sanitize order and orderby in get_terms()
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18344 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-27 15:45:12 +00:00
Ryan Boren
46d96c7704
Bring out the pinking shears.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18254 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-10 23:01:45 +00:00
Andrew Nacin
24d38bc521
Admin Bar: Add View Site/Dashboard links, 'View X' links in the admin, 'View' action link for terms. New custom taxonomy string: view_item, defaulting to 'View Tag' and View Category'. fixes #17705 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@18194 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-08 16:49:27 +00:00