[wp-trac] [WordPress Trac] #14306: Custom Taxonomies not associated to Custom Post Type on Export

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 2 23:33:55 UTC 2010


#14306: Custom Taxonomies not associated to Custom Post Type on Export
--------------------------+-------------------------------------------------
 Reporter:  jeffikus      |       Owner:                                                   
     Type:  defect (bug)  |      Status:  new                                              
 Priority:  normal        |   Milestone:  Awaiting Review                                  
Component:  Export        |     Version:  3.0                                              
 Severity:  normal        |    Keywords:  export, import, custom post type, custom taxonomy
--------------------------+-------------------------------------------------
Changes (by ajferg):

 * cc: ajferg (added)


Comment:

 Hi Jeffikus,

 I've also had this problem.  I'm not sure how to submit a patch, exactly,
 but I think I've found a fix.

 In /wp-admin/includes/export.php, there's a function wxr_post_taxonomy()
 about line 253

 Replace this:
 {{{
 $taxonomies = get_object_taxonomies( 'post' );
 $terms = wp_get_post_terms( $post->ID, $taxonomies );
 }}}

 With this:
 {{{
 $taxonomies = get_object_taxonomies( $post->post_type );
 $terms = wp_get_object_terms($post->ID, $taxonomies);
 }}}

 See if that fixes your issue?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14306#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list