[wp-trac] [WordPress Trac] #28146: Export Filter for Post IDs
WordPress Trac
noreply at wordpress.org
Tue May 6 10:47:48 UTC 2014
#28146: Export Filter for Post IDs
----------------------------+-----------------------------
Reporter: zourbuth | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Export | Version: 3.9
Severity: normal | Keywords:
Focuses: administration |
----------------------------+-----------------------------
I know there is an action hook '''export_wp''' we can use to create our
own export function for custom post queries.
The idea is to apply filters for the $post_ids at wp-
admin\includes\export.php line 87
{{{
$post_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} $join WHERE
$where" );
}}}
to
{{{
$post_ids = apply_filters( 'export_post_ids', $wpdb->get_col( "SELECT ID
FROM {$wpdb->posts} $join WHERE $where" ) );
}}}
so we can do custom post queries to generate the post id(s).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28146>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list