[wp-trac] [WordPress Trac] #24597: get_{$adjacent}_post_sort filter should have post type parameter
WordPress Trac
noreply at wordpress.org
Tue Jun 18 17:25:30 UTC 2013
#24597: get_{$adjacent}_post_sort filter should have post type parameter
----------------------------+-----------------------------
Reporter: helgatheviking | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
----------------------------+-----------------------------
In case a user doesn't want to change the sort order for every post type,
the post type should be passed as an extra parameter. The post type is
already a variable is already passed in the preceding post_where filter.
{{{
$sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date
$order LIMIT 1" );
}}}
should be updated with:
{{{
$sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date
$order LIMIT 1", $post->post_type );
}}}
in wp-includes/link-template.php
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24597>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list