[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
Thu Dec 11 01:53:41 UTC 2025
#61244: The export_wp() function inserts empty <wp:comment> data when get_comment()
returns a false or empty value
-------------------------------------------------+-------------------------
Reporter: WPExplorer | Owner:
| westonruter
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 7.0
Component: Export | Version: 4.4
Severity: minor | Resolution: fixed
Keywords: has-test-info has-patch needs- | Focuses:
testing changes-requested | administration
-------------------------------------------------+-------------------------
Changes (by westonruter):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"61369" 61369]:
{{{
#!CommitTicketReference repository="" revision="61369"
Export: Update `export_wp()` to handle `get_comment()` returning `null`
due to filter.
The `get_comment` filter now explicitly documents returning `null` in
addition to a `WP_Comment` object. This allows the filter to be used to
exclude comments from an export. The `get_comment()` function already
supported returning `null`.
Developed in https://github.com/WordPress/wordpress-develop/pull/8383
Props abcd95, WPExplorer, desrosj, mukesh27, westonruter, SirLouen,
lbones, mdibrahimk48, audrasjb, jorbin, wildworks, hellofromTonya,
saurabh.dhariwal, mabfahad.
Fixes #61244.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61244#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list