Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #36292, comment 10


Ignore:
Timestamp:
04/02/2016 12:37:05 AM (9 years ago)
Author:
giuseppe.mazzapica
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36292, comment 10

    initial v1  
    1515> OTOH, @rmccue's solution to use an object is a great first step is does not address other issues that the rewrite system has. The biggest problem I've run into with URL routing on client projects is that WordPress's rewrite system is context free and what we've often needed has been context sensitive routes. For example, if you want to have an `/about/` URL and also have your categories in the root `/politics/` and `/sports/` you can't do it with the WordPress Rewrite system as-is. And simply ignoring those use-case requirements ends up giving people who are against WordPress more ammunition to shoot it down.
    1616
    17 I'm very agree with this. This is why I proposed a system that adds rules with a callback: using a callback is very easy to pass context to it nad implement rule logic based on context. In fact, I proposed that rule callbacks should receive an instance of the yet ot come `WP_HTTP_Request` (that @rmccue mentioned in OP). that object would be enough to provide all the context is needed.
     17I'm very agree with this. This is why I proposed a system that adds rules with a callback: using a callback is very easy to pass context to it and implement rule logic based on context. In fact, I proposed that rule callbacks should receive an instance of the yet to come `WP_HTTP_Request` (that @rmccue mentioned in OP). That object would be enough to provide all the context is needed.
    1818
    1919