[wp-trac] [WordPress Trac] #34414: Add extra item fields to exported WXR file

WordPress Trac noreply at wordpress.org
Fri Oct 23 12:01:44 UTC 2015


#34414: Add extra item fields to exported WXR file
-----------------------------+-----------------------------
 Reporter:  kkarpieszuk      |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Export           |    Version:  trunk
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Hello

 I am one of WPML developers. WPML is plugin which allows user to make
 multilingual sites, set language information to posts etc.

 Straight to the point: we want to make it available to add  to exported
 posts/pages an information about their language. Language information is
 stored in our own tables, so we cannot use existing WXR <item> elements
 like those for taxonomies or custom fields.

 It would be perfect if before closing </item> tag would be executed
 hookable action which will echo those additional elements, coming from
 plugins such our.

 I am attaching proposed patch.

 Example of usage:
 {{{
 add_action('wxr_export_item_extra_fields',
 'here_wxr_export_item_extra_fields');

 function here_wxr_export_item_extra_fields($post) {
         echo "<testitempost id='" . $post->ID . "' />";
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34414>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list