[wp-trac] [WordPress Trac] #61244: The export_wp() function inserts empty <wp:comment> data when get_comment() returns a false or empty value

WordPress Trac noreply at wordpress.org
Sat May 18 17:13:21 UTC 2024


#61244: The export_wp() function inserts empty <wp:comment> data when get_comment()
returns a false or empty value
--------------------------+-----------------------------
 Reporter:  WPExplorer    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Export        |    Version:  trunk
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 If you wish to exclude comments from the WordPress export you can use the
 following code:


 {{{
 add_action( 'export_wp', function() {
     add_filter( 'get_comment', '__return_false' );
 } );
 }}}


 However, the function will still loop through empty values for the
 $comments array inserting unnecessary <wp:comment> items.

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


More information about the wp-trac mailing list