Commit Graph

400 Commits

Author SHA1 Message Date
scribu
9e939da4f3 Fix get_tax_sql() docs. Props Viper007Bond. Fixes #15431
git-svn-id: http://svn.automattic.com/wordpress/trunk@16382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-15 11:24:55 +00:00
scribu
2b58e241d0 Better error handling in get_meta_sql(). Props Viper007Bond. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-15 10:02:39 +00:00
scribu
03dd41a0d2 Improve hook readability via curly brackets. Props jjj for initial patch. Fixes #15422
git-svn-id: http://svn.automattic.com/wordpress/trunk@16365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-14 15:50:02 +00:00
nacin
fd4b0965f8 Only register post_format taxonomy to posts. see #15396, #14746.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-12 10:58:58 +00:00
scribu
3cbc8ef308 Make get_tax_sql() a standalone function. See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@16267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-09 23:30:35 +00:00
nacin
91d3b6bea9 Introduce menu_name label for taxonomies and post types. Defaults to name. fixes #14832.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-09 02:09:00 +00:00
scribu
568620021d Introduce get_terms_args filter. Fixes #15020
git-svn-id: http://svn.automattic.com/wordpress/trunk@16059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-28 19:09:18 +00:00
scribu
bc5d96f856 Add terms_clauses filter. Props sc0ttkclark for initial patch. See #15020
git-svn-id: http://svn.automattic.com/wordpress/trunk@16056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-28 17:55:30 +00:00
scribu
c613576e77 Introduce sanitize_title_for_query(). See #9591
git-svn-id: http://svn.automattic.com/wordpress/trunk@15929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-23 12:55:55 +00:00
scribu
99f5c0f184 Remove debugging code in wp_check_term_hierarchy_for_loops(). See #14662
git-svn-id: http://svn.automattic.com/wordpress/trunk@15922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-22 21:31:57 +00:00
nacin
14ccdbec33 Pruning shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-21 19:55:28 +00:00
nacin
5e1184aa57 Pinking shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 07:48:22 +00:00
nacin
76e493c281 Full @since's for 3.1.0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 07:38:42 +00:00
dd32
81924ad20b Merge Category/Tag URL creation/rewriting into general Taxonomy system. Removes the legacy handling for these url's. See #12659
git-svn-id: http://svn.automattic.com/wordpress/trunk@15825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-17 05:41:22 +00:00
dd32
baa0935d9a Move hierarchical_url to $args['rewrite']['hierarchical']
git-svn-id: http://svn.automattic.com/wordpress/trunk@15824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-17 04:36:26 +00:00
ryan
3df9f849ce nav_menu and post_format taxonomies should not be public. fixes #15107
git-svn-id: http://svn.automattic.com/wordpress/trunk@15818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-15 14:53:55 +00:00
ryan
0a01e66745 Prevent post and term hierarchy loops. Props mdawaffe. fixes #14662
git-svn-id: http://svn.automattic.com/wordpress/trunk@15806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-14 15:09:04 +00:00
ryan
6ffa9e31d3 Don't hide empty terms when determing exclude trees. Props layotte. fixes #14446
git-svn-id: http://svn.automattic.com/wordpress/trunk@15797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-13 20:12:20 +00:00
ryan
0982c3c0f9 Post formats, take one. see #14746
git-svn-id: http://svn.automattic.com/wordpress/trunk@15777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-12 18:33:14 +00:00
nacin
b7bacd1bf2 s/Wether/Whether/
git-svn-id: http://svn.automattic.com/wordpress/trunk@15756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-08 02:35:06 +00:00
scribu
54304cc2d4 Prevent db error when dealing with unexistant parent term. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-06 12:06:23 +00:00
scribu
38888b588d Make hierarchical URLs work for any hierarchical taxonomy. See #12659
git-svn-id: http://svn.automattic.com/wordpress/trunk@15732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-06 11:04:03 +00:00
scribu
a8367fa6f2 Generalize taxonomy queries:
* transform wp_tax_query() into WP_Object_Query::get_tax_sql()
	* create parse_tax_query() method in WP_Query
	* add doc-block for $tax_query and $meta_query
See #15032. See #12891.


git-svn-id: http://svn.automattic.com/wordpress/trunk@15731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-06 10:40:30 +00:00
nacin
7119d7429e Restore wp_delete_category. props blepoxp, fixes #15008.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-04 16:28:01 +00:00
dd32
d9e1a542ee Introduce hierarchical taxonomy URL's, Can be enabled by setting 'hierarchical_url' to true upon taxonomy registration. See #12659
git-svn-id: http://svn.automattic.com/wordpress/trunk@15705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-04 10:37:25 +00:00
nacin
c6ff4fbaa9 Have wp_delete_category wrap wp_delete_term. Move wp_delete_category into wp-includes scope for consistency. fixes #15008, props blepoxp.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-03 07:29:44 +00:00
nacin
4e666d5d44 Move some post and taxonomy functions from admin/includes to wp-includes in preparation for QuickPress template tag. Moves get_tags_to_edit, get_terms_to_edit, get_default_post_to_edit, media_buttons, _media_button, get_upload_iframe_src. Also introduce get_media_buttons as a wrapper for media_buttons. props jorbin, see #14966.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-03 02:58:59 +00:00
scribu
d4ded42a1b get_objects_in_term(): include term children when querying by slug. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-24 14:08:07 +00:00
scribu
dea3a23691 Introduce get_ancestors(). Props filosofo. Fixes #12443
git-svn-id: http://svn.automattic.com/wordpress/trunk@15631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-18 19:20:16 +00:00
scribu
2030231f66 Clean up taxonomy queries in WP_Query. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-13 16:44:14 +00:00
nacin
5a20c05d27 Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 11:21:11 +00:00
markjaquith
48ca617449 Make the second (taxonomy) parameter for get_term_link() optional if you pass in a term object as the first argument (which has the taxonomy in it). fixes #13081. props scribu
git-svn-id: http://svn.automattic.com/wordpress/trunk@15586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 04:29:00 +00:00
markjaquith
437a0f5cbb Do not cache terms indefinitely... use TTL of one day. fixes #11431. props Denis-de-Bernardy
git-svn-id: http://svn.automattic.com/wordpress/trunk@15583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 04:13:01 +00:00
scribu
020ce73746 Ajaxify list-type screens in the admin. See #14579
git-svn-id: http://svn.automattic.com/wordpress/trunk@15491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-08-11 21:54:51 +00:00
ryan
900c2e22d4 If category already exists, return its ID. Restores previous behavior. fixes #14067 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/trunk@15425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-14 14:12:23 +00:00
dd32
a14d289755 Alot more tabs. Props jacobsantos & Viper007bond. See #14147
git-svn-id: http://svn.automattic.com/wordpress/trunk@15355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-30 00:05:18 +00:00
ryan
c614b6d0a2 Deprecate is_term, is_taxonomy, is_post_type for *_exists(). Props nacin. fixes #13747
git-svn-id: http://svn.automattic.com/wordpress/trunk@15220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-11 15:53:41 +00:00
nacin
af612805e8 Move 'helps' argument to the taxonomy labels object. Also move over help_nojs and help_cloud, both introduced in 3.0. This adds three new core labels for non-hierarchical taxonomies, for tweaking the meta box strings. fixes #13805.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-10 16:07:33 +00:00
nacin
bdd183d1eb Remove 'popular_items' label for hierarchical taxonomies. see [15140], [15141]
git-svn-id: http://svn.automattic.com/wordpress/trunk@15142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-04 19:21:06 +00:00
ryan
17129fb62e Cut 'em out, move 'em on, trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@15116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 20:04:07 +00:00
ryan
23ad4b4ef0 Remove debug. fixes #13670
git-svn-id: http://svn.automattic.com/wordpress/trunk@15110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 15:00:09 +00:00
ryan
dd66d99477 Make _pad_term_counts custom post type aware. Props reko. fixes #13670
git-svn-id: http://svn.automattic.com/wordpress/trunk@15108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 14:55:33 +00:00
nacin
b69c4270ca Fix a default taxonomy label. props michaelh, fixes #13624.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-29 20:45:31 +00:00
nacin
332c2773e0 Use show_in_nav_menus for attachments. Also add it to register_taxonomy for consistency and have it default to public, not show_ui, like post types. see #13621.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-29 16:46:46 +00:00
nacin
c0289daf99 Don't store nonexistent (deleted) menus in the auto-add option. see #13447.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 05:11:46 +00:00
ryan
1a552dd029 Strip trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@14924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 02:42:15 +00:00
ryan
27015b92ee Fix update label for link categories. Props duck_. fixes #13515
git-svn-id: http://svn.automattic.com/wordpress/trunk@14841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-24 16:09:52 +00:00
ryan
8b5b7a7e75 Remove already exists check for passed in slug. fixes #12349
git-svn-id: http://svn.automattic.com/wordpress/trunk@14840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-24 15:56:50 +00:00
ryan
7f96fff66f Don't issue dupe slug error if provided slug matches name derived slug. fixes #12349
git-svn-id: http://svn.automattic.com/wordpress/trunk@14839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-24 15:49:12 +00:00
ryan
5659224918 Update phpdoc for wp_insert_term(). Props prettyboymp. fixes #12482
git-svn-id: http://svn.automattic.com/wordpress/trunk@14785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-21 18:19:56 +00:00
ryan
a05a51829a If slug and name match an existing term in the same taxonomy at the same hieararchy level return error. fixes #13481
git-svn-id: http://svn.automattic.com/wordpress/trunk@14784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-21 18:03:53 +00:00
ryan
7d01ad3a49 Check for siblings only if term already exists in the same taxonomy. see #13119
git-svn-id: http://svn.automattic.com/wordpress/trunk@14783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-21 16:03:35 +00:00
nbachiyski
c1dea00b62 Keep label as a quick way to set up a taxonomy/post type, without diving into the labels array. Deprecate singular_label while there. Props nacin. Fixes #13357
git-svn-id: http://svn.automattic.com/wordpress/trunk@14619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 02:13:49 +00:00
nbachiyski
4cf46b6d96 I18n for custom taxonomies. Fixes #13357
git-svn-id: http://svn.automattic.com/wordpress/trunk@14614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 00:34:04 +00:00
ryan
742db4bc22 get_term_by('id') -> get_term(). Add get_term filters to get_term_by.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-13 19:16:09 +00:00
nacin
af91e5264a Move taxonomy object properties for capabilities into a cap object. Capabilities can be specified via ['capabilities'] (an array keyed by the generic cap name) for register_taxonomy. fixes #13358.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-13 04:10:17 +00:00
ryan
98b2e56753 Don't order term count queries.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-11 16:50:25 +00:00
nacin
6e33a3ec34 Small fix to r14479. see #13109.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-06 18:16:39 +00:00
nacin
90a0883b12 Allow get_object_taxonomies to return taxonomy objects. props scribu, fixes #13109.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-06 18:07:50 +00:00
nacin
86c5154557 Clean up whitespace in status/PT/tax registration.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 06:13:28 +00:00
ryan
7b7243d94a Strip trailing whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 20:26:11 +00:00
wpmuguru
98c3888a06 only append parent term slug until unique slug found, see #10712
git-svn-id: http://svn.automattic.com/wordpress/trunk@14234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-25 15:25:00 +00:00
dd32
99b439c6f7 Allow Terms to exist within multiple taxonomies (Regression in 3.0); If a term slug is provided on the form, Respect it (do not suffix it, instead, feedback with error); Do not allow hierarchical term names to exist multiple times within a set level (ie. AU/NSW + AU/NSW is bad, AU/NSW + AU/VIC + AU/VIC/NSW is ok). See #13060
git-svn-id: http://svn.automattic.com/wordpress/trunk@14229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-25 07:35:16 +00:00
nacin
14916e2449 Introduce the wp_filter_object_list() helper, with an $operator arg. Fixes an intersection bug in get_post_types() and get_taxonomies(). Also switches $operator default from 'or' to 'and' for get_post_stati(). props scribu, fixes #12966.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-16 14:08:58 +00:00
ryan
eec2968be7 Sanity check terms. Skip term IDs that don't exist.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-13 14:32:30 +00:00
ryan
7095a9b0d3 Move wp-ajax_add-tax hook back to registration. Reverts part of [13924]. see #10437
git-svn-id: http://svn.automattic.com/wordpress/trunk@13946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-02 17:07:30 +00:00
wpmuguru
1f7d47157d rework syncing of global terms, see #12663
git-svn-id: http://svn.automattic.com/wordpress/trunk@13925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-02 01:26:44 +00:00
dd32
44ae35ec09 Use the taxonomy show_ui flag to control if all WordPress generated UI is exposed (Menu previously, This affects metaboxes). See #10437
git-svn-id: http://svn.automattic.com/wordpress/trunk@13924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-02 01:23:58 +00:00
nacin
91c72b74aa s/hierarachical/hierarchical/g. Props JohnPBloch.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-01 14:37:38 +00:00
nacin
fca5b63772 Bail in wp_unique_term_slug if the slug is unique and we don't need to come up with a new one. fixes #10712.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-27 07:56:54 +00:00
nacin
a7feaed0e6 Change @since 3.0 to @since 3.0.0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:13:36 +00:00
nacin
258430405b Correct inline docs and parameter names for get_objects_in_term() to reflect that it uses term ids, not term slugs. fixes #11835
git-svn-id: http://svn.automattic.com/wordpress/trunk@13821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 14:00:17 +00:00
nacin
ba6f1cba07 Various bug fixes and improvements to menu management. props ptahdunbar, see #11817.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-22 19:56:16 +00:00
markjaquith
5c4b8b1d7b nav_menu taxonomy should be _builtin. props sillybean. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 20:03:02 +00:00
ryan
e25a65b36a Trim trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@13733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 16:27:25 +00:00
ryan
f635d99754 Menus rework. Props ptahdunbar. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-15 16:26:46 +00:00
dd32
829cc698b9 Update 'edited_term_taxonomy' to pass the same args in all locations called. See #12348
git-svn-id: http://svn.automattic.com/wordpress/trunk@13626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-09 10:53:02 +00:00
dd32
078706399a Add custom post_type support to _update_post_term_coun(). Props momo360modena. Fixes #12348
git-svn-id: http://svn.automattic.com/wordpress/trunk@13625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-09 10:48:18 +00:00
ryan
e35acd21f7 get_taxonomies(). Props ptahdunbar, scribu. fixes #12516
git-svn-id: http://svn.automattic.com/wordpress/trunk@13608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-06 18:20:11 +00:00
dd32
2ecc414b32 Fix double slashing on /index.php//taxonomy/term/ links. Props Scribu. Fixes #12508. Also Fixes #10445
git-svn-id: http://svn.automattic.com/wordpress/trunk@13597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-06 03:43:23 +00:00
dd32
1b564b41f5 Use get_terms() in wp_count_terms(). Props scribu. Fixes #10746
git-svn-id: http://svn.automattic.com/wordpress/trunk@13491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 07:37:24 +00:00
nacin
4b88d15411 Add pre_insert_term hook to wp_insert_term(). fixes #10943 props sirzooro
git-svn-id: http://svn.automattic.com/wordpress/trunk@13430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-26 07:40:35 +00:00
ryan
46ae8913d3 Pass taxonomy when looking for duplicate term slug.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-25 21:04:02 +00:00
nacin
8bcc5969dc Spelling and grammar fun. Fixes #11875 props cnorris23
git-svn-id: http://svn.automattic.com/wordpress/trunk@13382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-24 20:13:23 +00:00
wpmuguru
d91b382e1f fix debug notice in wp_set_object_terms(), props jeremyclarke, fixes #12344
git-svn-id: http://svn.automattic.com/wordpress/trunk@13321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-23 02:37:19 +00:00
dd32
0ec732b34a Introduce assign_cap for Taxonomies, Defaults to 'edit_posts'. Allows for Authors/Contributors to tag/categorise their posts. See #12035
git-svn-id: http://svn.automattic.com/wordpress/trunk@13289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-22 08:36:32 +00:00
ryan
41bea20d51 Use nav_menu as the taxonomy name and nav_menu_item as the post type. Set object_id in postmeta. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-21 18:24:41 +00:00
dd32
1a5475f224 add show_tagcloud to Taxonomy registration & add basic PHPDoc, See #11612
git-svn-id: http://svn.automattic.com/wordpress/trunk@13277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-21 02:55:07 +00:00
ryan
dbfb51c6e0 Trim trailing whites
git-svn-id: http://svn.automattic.com/wordpress/trunk@13268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-21 00:03:42 +00:00
ryan
470eb8e6ce Remove custom post states. Register taxonomy against menu_item post type. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-20 22:35:39 +00:00
ryan
f120e4319d Don't show menu for menu taxonomy. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-20 22:24:47 +00:00
ryan
94a42d9ba2 Set taxonomy label if none given.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-20 22:21:20 +00:00
wpmuguru
4d203a02c6 introduce custom menus, props jeffikus, See #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-20 21:57:43 +00:00
dd32
39620db24d First pass at giving taxonomies a show_ui param. See #10773
git-svn-id: http://svn.automattic.com/wordpress/trunk@13216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-19 10:21:29 +00:00
dd32
9d2b6b6047 2nd pass at Taxonomy Term canonicalisation. Fix get_term_link() to expect null|false||WP_Error failure from get_term() family. See #12245, #8948
git-svn-id: http://svn.automattic.com/wordpress/trunk@13170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-16 09:08:26 +00:00
dd32
d5eac90642 Prevent Terms from being created in multiple taxonomies. If a slug is provided by the user, error out if it exists, else make the auto slug unique. See #11838
git-svn-id: http://svn.automattic.com/wordpress/trunk@13087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 05:52:27 +00:00
dd32
5928ae6e76 Introduce Custom Taxonomies Translation strings, Correctly identifies the taxonomy in the Strings of the edit pages. See #11838
git-svn-id: http://svn.automattic.com/wordpress/trunk@13083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 04:18:33 +00:00
dd32
884a4bca15 $term is an array not object, Fixes Notice on duplicate term checking. See #11838
git-svn-id: http://svn.automattic.com/wordpress/trunk@13010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-07 06:51:05 +00:00
ryan
40e61f93e5 Change back to an option so that it is always there and regenerate it after cleaning the cache instead of waiting for the next page load. Don't clean taxonomy wide caches when just updating object counts to avoid cleaning when updating a post.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-27 19:42:23 +00:00
dd32
f80381d9a5 Remove accidental capability testing code. See #12035
git-svn-id: http://svn.automattic.com/wordpress/trunk@12834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-26 11:37:25 +00:00
dd32
32adec13a9 First scratch at Taxonomy Capabilities. See #12035
git-svn-id: http://svn.automattic.com/wordpress/trunk@12833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-26 11:32:04 +00:00
dd32
34cc6ab57e Merge Categories/Hierarchical taxonomies into edit-tags.php. See #11838
git-svn-id: http://svn.automattic.com/wordpress/trunk@12818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-24 11:00:27 +00:00
ryan
b1b44019ff Create metaboxes for hierarchical taxonomies. Props prettyboymp. fixes #10122
git-svn-id: http://svn.automattic.com/wordpress/trunk@12798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-22 19:30:05 +00:00
ryan
141583e4c6 Add flag to taxonomy registration allowing permalinks to be prepended with front, or not. Props prettyboymp. fixes #11449
git-svn-id: http://svn.automattic.com/wordpress/trunk@12791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-21 22:25:16 +00:00
ryan
6da55f7792 Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@12733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-15 22:11:12 +00:00
ryan
933e511518 Support id=>parent in fields arg of get_terms. Returns array of parent ids keyed by the id of the child term.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-15 17:40:37 +00:00
ryan
0495192229 Make _get_term_hierarchy() query more efficient.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-12 20:12:04 +00:00
ryan
b4447f9f9c Mainstream things that don't need to be multisite only. Formatting cleanups. see #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-11 22:23:58 +00:00
wpmuguru
7b64248bc8 merge in multisite login, wp-includes, See #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-11 21:49:40 +00:00
ryan
30181fd9ea Convert taxonomy children cache into a transient. fixes #11866
git-svn-id: http://svn.automattic.com/wordpress/trunk@12693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-11 18:53:52 +00:00
westi
4d0c9da793 Add support to get_terms() to allow 'include' & 'exclude' args to be arrays(). Fixes #11076 props scribu.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-08 08:44:45 +00:00
ryan
ec8e347792 Introduce home_url(). Props Denis-de-Bernardy, hakre. see #9008
git-svn-id: http://svn.automattic.com/wordpress/trunk@12598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-04 17:23:29 +00:00
ryan
da89de4958 More custom post type support. Props scribu. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@12597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-04 16:58:43 +00:00
ryan
cedfa0181b Use array calling style. Props Denis-de-Bernardy. see #6647
git-svn-id: http://svn.automattic.com/wordpress/trunk@12515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-23 15:31:02 +00:00
ryan
36d9a3677e Cleanup clean_term_cache(). Props Denis-de-Bernardy. see #11530
git-svn-id: http://svn.automattic.com/wordpress/trunk@12510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-23 14:37:21 +00:00
ryan
b2af12a900 Pass taxonomy to created, edited, create, and edit actions. Props Denis-de-Bernardy. fixes #11429
git-svn-id: http://svn.automattic.com/wordpress/trunk@12397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-14 16:46:05 +00:00
westi
693451e75f Pass the old term_taxonomy ids to the action in set_object_terms so plugins know what was before. Fixes #10962 props simonwheatley.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-22 22:33:45 +00:00
ryan
8414c6c62f Use correct var name
git-svn-id: http://svn.automattic.com/wordpress/trunk@12243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-20 17:32:56 +00:00
ryan
4b20540781 Fix double slashing. Props scribu. fixes #11061
git-svn-id: http://svn.automattic.com/wordpress/trunk@12241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-20 14:23:41 +00:00
ryan
1d3d70d375 Fix custom taxonomy term links when using non-pretty permalinks. Props bookchiq. fixes #11179
git-svn-id: http://svn.automattic.com/wordpress/trunk@12229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-19 22:41:53 +00:00
ryan
4b8a5274af Return null if no term queried. fixes #11112
git-svn-id: http://svn.automattic.com/wordpress/trunk@12200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-17 20:51:32 +00:00
ryan
57f26bb58e Remove trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@11971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-09-24 17:19:13 +00:00
ryan
ae21304492 Actions for taxonomy updates. Props Demitrious Kelly. fixes #10750
git-svn-id: http://svn.automattic.com/wordpress/trunk@11941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-09-17 14:03:57 +00:00
ryan
f50600bc13 Fix parent=0 queries. Props Denis-de-Bernardy 107 minutes ago. . fixes #9960
git-svn-id: http://svn.automattic.com/wordpress/trunk@11476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-28 18:06:08 +00:00
ryan
d77f57c34f Fix default orderby for tt_id query. see #9937
git-svn-id: http://svn.automattic.com/wordpress/trunk@11469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-27 17:09:19 +00:00
ryan
b32a87962a Fix default orderby for tt_id query. see #9937
git-svn-id: http://svn.automattic.com/wordpress/trunk@11468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-27 17:00:30 +00:00
ryan
8600adb080 Add orderby = none option to wp_get_object_terms(). Props vladimir_kolesnikov. fixes #9937
git-svn-id: http://svn.automattic.com/wordpress/trunk@11457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-25 18:18:06 +00:00
ryan
2df887bd07 Trim tailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@11450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-24 23:47:49 +00:00
azaozz
284e1c0559 Make get_terms() orderby case insensitive, props DD32, fixes #9906
git-svn-id: http://svn.automattic.com/wordpress/trunk@11428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-22 12:29:32 +00:00
ryan
0d81b0ea1a Revert [11263]. Busted several themes. see #9323
git-svn-id: http://svn.automattic.com/wordpress/trunk@11324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-14 04:09:01 +00:00
ryan
6fe87c07bc Accept only IDs for get_term_link(). Prop filosofo. fixes #9323
git-svn-id: http://svn.automattic.com/wordpress/trunk@11263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-11 16:37:42 +00:00
ryan
80078c3882 Allow use of _pad_term_counts for all hierarhcical taxonomies. Props mgsisk, Denis-de-Bernardy. fixes #8350
git-svn-id: http://svn.automattic.com/wordpress/trunk@11260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-11 05:01:12 +00:00
ryan
1d367b556c Pass IDs, not objects, to get_category_link(). fixes #9784
git-svn-id: http://svn.automattic.com/wordpress/trunk@11257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-11 04:45:39 +00:00
westi
f80f234fdd Fix typo in [11253] fixes #8704 props Denis-de-Bernardy.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-10 09:25:43 +00:00
westi
077697d1ca Add a filter to the result of wp_get_object_terms(). Fixes #8704 props Denis-de-Bernardy.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-10 09:11:58 +00:00
westi
e61bea89ed Allow for custom ordering in get_terms(). Fixes #7539 props DD32.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-10 07:57:07 +00:00
markjaquith
d7b015645d esc_js(). Shorter, follows new escaping naming convention.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-09 07:27:22 +00:00
ryan
e15c230205 Return ref. Props nbachiyski. fixes #9109
git-svn-id: http://svn.automattic.com/wordpress/trunk@11216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-06 05:03:59 +00:00
markjaquith
6c2ffddf31 _a(), _ea(), _xa(), attr() are now esc_attr__(), esc_attr_e(), esc_attr_x(), esc_attr() -- still short, but less cryptic. see #9650
git-svn-id: http://svn.automattic.com/wordpress/trunk@11204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-05 19:43:53 +00:00
azaozz
83f674bf9a Banishing ASCII quotes and apostrophes, props demetris, fixes #9655
git-svn-id: http://svn.automattic.com/wordpress/trunk@11190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-05 04:28:05 +00:00
ryan
7fc314e858 strip slashes from term before prepare(). Props jhodgdon. see #6593
git-svn-id: http://svn.automattic.com/wordpress/trunk@11153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-01 22:05:04 +00:00
ryan
e52d7eee0b Trim term before checking if it already exists. Props jhodgdon. fixes #9397
git-svn-id: http://svn.automattic.com/wordpress/trunk@11151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-01 20:59:14 +00:00
ryan
30ee53dd96 Fix registration of default taxonomies so that proper rewrite rules are written.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-30 19:05:32 +00:00
ryan
11cbf4e3d7 Fix category search pagination. Fix caching of empty term results. Props Denis-de-Bernardy. fixes #8632
git-svn-id: http://svn.automattic.com/wordpress/trunk@11140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-30 16:51:45 +00:00
ryan
fcd5b67d67 Allow plugins to override default taxonomies. Props Denis-de-Bernardy. fixes #9647
git-svn-id: http://svn.automattic.com/wordpress/trunk@11129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-29 20:25:30 +00:00
ryan
5a1c8da169 Allow taxonomy registration before init. Props arena. fixes #9647
git-svn-id: http://svn.automattic.com/wordpress/trunk@11122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-29 16:40:36 +00:00
ryan
7eaed7cc08 get_term_children phpdoc and var naming improvements. Props simonwheatley. fixes #9667
git-svn-id: http://svn.automattic.com/wordpress/trunk@11115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-28 19:49:21 +00:00
ryan
2d489767bb s/attribute_escape/attr/. see #9650
git-svn-id: http://svn.automattic.com/wordpress/trunk@11109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-28 05:58:45 +00:00
ryan
91a3c4bbf4 Clarify args to wp_update_term(). Props simonwheatley, johnbillion. fixes #9293
git-svn-id: http://svn.automattic.com/wordpress/trunk@11068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-23 08:05:36 +00:00
ryan
9f82f611da get_terms_orderby, get_terms_fields, and tag_clooud-sort filters. Props jhodgdon, filosofo. fixes #9004
git-svn-id: http://svn.automattic.com/wordpress/trunk@11037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-21 22:13:44 +00:00