[wp-trac] [WordPress Trac] #16303: Improve documentation and usability of WP_Rewrite Endpoint support
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 25 23:16:43 UTC 2012
#16303: Improve documentation and usability of WP_Rewrite Endpoint support
-------------------------------------------------+-------------------------
Reporter: westi | Owner: westi
Type: defect (bug) | Status: new
Priority: lowest | Milestone: Future
Component: Rewrite Rules | Release
Severity: normal | Version: 3.1
Keywords: westi-likes has-patch commit dev- | Resolution:
feedback |
-------------------------------------------------+-------------------------
Comment (by westi):
Replying to [comment:17 duck_]:
> I attached a new version of the improved functionality patch.
>
> However, there are a couple of issues:
>
> * Should EP_ROOT be included in EP_ALL_ARCHIVES? It depends on the
page_on_front option as to whether or not it's an archive.
> * Is EP_CPT_ARCHIVE usable? This was alluded to in previous comments.
register_post_type() uses WP_Rewrite::add_rule() when creating rewrites
for CPT archives, and this means no endpoints.
I don't think that the ROOT of the site is ever an archive view really
(and it people want to include it they can OR it in) I think have
different behaviour for / not for page on front could be confusing and
would mean we would need to flush and regen rules if the option changed.
I'm not sure if EP_CPT_ARCHIVE is currently usable but it is something
that I feel should be usable - use case something like the example JSON
endpoint above would automatically get a JSON version of any CPT archive
view if it works ( I can't remember how I tested at the time but I can
probably dig the code out - I was working around the concepts of a Person
CPT with the CPT Archives be "People")
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16303#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list