[wp-trac] [WordPress Trac] #16687: %postname% permalinks should not trigger verbose rewrite rules
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 27 08:51:32 UTC 2011
#16687: %postname% permalinks should not trigger verbose rewrite rules
-----------------------------+-----------------------------
Reporter: nacin | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: Rewrite Rules | Version:
Severity: normal | Resolution:
Keywords: |
-----------------------------+-----------------------------
Comment (by Denis-de-Bernardy):
Suggestion:
{{{
select *
from posts
where post_parent is null
and post_name = %
order by post_type <> 'post'
limit 1
}}}
and for /%category%/%postname%/:
{{{
select *
from posts
where (post_parent is null) = (post_type = 'post')
and post_name = %
order by post_type <> 'post'
limit 1
}}}
limit 1 is, arguably, only useful only if we don't want to double check
the result.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16687#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list