[wp-trac] [WordPress Trac] #22435: Export API

WordPress Trac noreply at wordpress.org
Wed Nov 14 10:47:20 UTC 2012


#22435: Export API
------------------------------------+------------------------------
 Reporter:  nbachiyski              |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Export                  |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+------------------------------

Comment (by scribu):

 Nikolay, rmccue and I had a nice chat in IRC about this thing.

 Instead of having helper methods like export_to_xml_file(), we could have
 an even simpler interface:

 {{{
 function wp_export( $filters = array(), $additional_args = array() ) {
   $filters_defaults = array(
     'post_type' => 'post',
     'posts_per_page' => -1
     ...
   );

   $additional_args_defaults = array(
     'format' => 'xml',
     'writer' => 'WP_WXR_File_Writer',
     ...
   );

   // instantiate things, etc.
 }
 }}}

 and of course devs can skip wp_export() and instantiate the classes
 themselves.

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


More information about the wp-trac mailing list