Opened 12 years ago
Closed 12 years ago
#2399 closed enhancement (fixed)
Include 'Topic-Tag' Descriptions & Slugs with bbPress Importer
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.5 | Priority: | normal |
| Severity: | normal | Version: | 2.4.1 |
| Component: | API - Importers | Keywords: | has-patch |
| Cc: |
Description
bbPress importer converter.php 'Tags Section' only imports 'topic'tag' taxonomy data fields:
- 'Topic Tag' Topic id.
objectid - 'Topic Tag' Taxonomy ID.
taxonomy - 'Topic Tag' Term name.
name
Include extra taxonomy data when avaiable
- 'Topic Tag'
sluginwp_terms - 'Topic Tag'
descriptioninwp_term_taxonomy
http://bbpress.trac.wordpress.org/browser/trunk/includes/admin/converter.php#L928
http://codex.wordpress.org/Function_Reference/wp_set_object_terms
http://codex.wordpress.org/Function_Reference/wp_set_post_terms
http://codex.wordpress.org/Function_Reference/add_metadata
Attachments (1)
Change History (6)
#2
@
12 years ago
Leaving this here for now... I think its something like this that is needed, though that something should work, this does not!
-
bbPress/includes/admin/converter.php
diff --git a/bbPress/includes/admin/converter.php b/bbPress/includes/admin/converter.php index 2588109..af6944b 100644
a b abstract class BBP_Converter_Base { 949 949 950 950 case 'tags': 951 951 $post_id = wp_set_object_terms( $insert_postmeta['objectid'], $insert_postmeta['name'], 'topic-tag', true ); 952 953 if ( ( 'tags' == $to_type ) && ( 'description' == $key ) ) { 954 $term = get_term_by( 'name', $insert_postmeta['name'], 'topic-tag') 955 $termid = $term->term_id; 956 wp_update_term( $termid, 'topic-tag'], array( 'description' => $insert_postmeta['description'] )); 957 } 958 959 if ( ( 'tags' == $to_type ) && ( 'slug' == $key ) ) { 960 $term = get_term_by( 'name', $insert_postmeta['name'], 'topic-tag') 961 $term_id = $term->term_id; 962 wp_update_term( $term_id, 'topic-tag'], array( 'slug' => $insert_postmeta['slug'] )); 963 } 952 964 break; 953 965 954 966 /** Forum, Topic, Reply ***************************/
#3
@
12 years ago
- Keywords has-patch added; needs-patch removed
- Version changed from 2.3.2 to 2.4.1
In 2399.diff
- Add support for importing taxonomy
topic-tagtermsluganddescription - Import bbPress1 topic-tag slug
- Import Drupal7 topic-tag slug and description
- Import Example topic-tag slug and description
- Import PHPFox3 topic-tag slug
- Import vBulletin topic-tag slug
- Import vBulletin3 topic-tag slug
Good call. Let's try to do this in 2.5.