[wp-trac] [WordPress Trac] #28146: Export Filter for Post IDs
WordPress Trac
noreply at wordpress.org
Tue Feb 10 21:11:10 UTC 2015
#28146: Export Filter for Post IDs
-----------------------------------+-----------------------------
Reporter: zourbuth | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Export | Version: 3.9
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses: administration
-----------------------------------+-----------------------------
Comment (by sc0ttkclark):
Replying to [comment:5 johnbillion]:
> I think we'd be better off adding a filter to the initial query SQL,
rather than applying a filter to the post IDs after the query runs. Unless
there is a use case for filtering the post IDs array rather than the SQL?
I'd really like to see a filter on $join / $where pieces so I can add
custom taxonomy support or whatever else I might want to.
Although, I'm just going to throw this out there.. I have no idea why this
couldn't easily use a get_posts with 'fields' => 'ids' and change all of
the manual SQL to utilize WP_Query args, with a filter on the args before
they go into WP_Query.
I know #22435 proposes some more sweeping changes for abstraction and
cleanup, but WP_Query would ultimately be the most flexible option for
this as a solution to the overall problem (not being able to control the
Post IDs that get sent to the export output)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28146#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list