Opened 18 years ago
Closed 18 years ago
#4100 closed enhancement (fixed)
UTW Tag Importer
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.2 | Priority: | low |
Severity: | trivial | Version: | 2.2 |
Component: | Administration | Keywords: | tags import |
Focuses: | Cc: |
Description
New importer to migrate tags and tag->post relationships from a user's existing UTW installation into the new Wordpress-native tagging structure.
Attachments (1)
Change History (16)
#2
in reply to:
↑ 1
@
18 years ago
Matt mentioned in #wordpress that it'd be nice to have an importer for the most-used tagging package available, and I tend to agree. Just like we provide solutions for people switching from MT, it makes sense to allow people to easily switch from the often-used UTW to the native platform easily.
If it's not going to be included, it'd probably make more sense to re-work it into a plugin. It's not often that people have to drop something new into wp-admin, so it may be a tad confusing that way.
#3
@
18 years ago
If tags are going to be added to the core, then we either need a way to:
a) Import from popular tagging plugins and have that in the core too, or
b) Have the ability to turn off or otherwise disable the new core tagging functions, so that people can choose to continue using their existing tagging plugins.
Without a way to import, the new tagging will not get much acceptance. This really, really needs to be in the core. Somehow.
Maybe we can just do it automatically, as part of the upgrade process?
#4
@
18 years ago
I don't think it should be done automatically. With all the themes already built to utilize UTW functions / etc, I don't think we should automatically assume that as soon as WP-native tagging is released everyone will switch to it.
I agree that a core feature should have a way to import it from another leading system. But don't just automatically assume I want to switch from that system... I may not want to, at least not yet.
#5
@
18 years ago
Use the new wp_create_tag instead of wp_create_category. I think the query in post_has_tag need to use rel_type. You could use get_post_tags, but we might not want the caching overhead in an import context. Also, does post_has_tag need to do a COUNT? We just need 1 result to know if there are tags.
add_post_tag is missing some things that need to be done, such as updating counts. Perhaps we should create wp_add_post_tag() or add an append arg to wp_set_post_tags.
#7
@
18 years ago
Fine by me. Probably should make it wp_add_post_tags() so we can add multiple tags at once if desired. It might just call wp_set_post_tags with an arg, though, to avoid duplicate code between the two functions.
#8
@
18 years ago
I think making it a wrapper for wp_set_post_tags (with append arg) would make sense. It'd still be nice to have an obviously-named function for adding tags.
I fixed the post_has_tag query so that it just tries to grab a rel_id and tacked on the rel_type (although to be honest... tag_id should be unique, how would we ever get a category and a tag with the same id?). Whenever you're done with any additional functions (like wp_add_post_tags), I'll post a revised version.
#10
@
18 years ago
Alright, new version utilizes the new tagging functions and should address all the issues ryan brought up.
Thanks to h0bbel for being my first live guinea pig!
#11
@
18 years ago
+1 for commit. We can iterate bug fixes on top. Robin, please review and commit if it looks good to you.
Cool, but I don't know if this should be shipped with WordPress. Maybe we should just make it an official solution for people using UTW (but not bundle it with WP, since not everyone uses/used UTW).
Cool work, though!