[wp-trac] [WordPress Trac] #18450: New safe action to add rewrite rules on
WordPress Trac
wp-trac at lists.automattic.com
Fri Aug 19 10:25:04 UTC 2011
#18450: New safe action to add rewrite rules on
------------------------------------+------------------------------
Reporter: simonwheatley | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 3.2.1
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------------------
Comment (by simonwheatley):
Replying to [comment:9 dd32]:
>
> Now that, You definately shouldn't do (flush on init).
>
Agreed; apologies for the confusion, which has taken away from the point I
was trying to make.
The methods described above are not fool-proof, I believe, as they rely on
the ```add_rewrite_rules``` call coming before **any**
```flush_rewrite_rules``` call. As the demo plugin (refactored version
attached, using the method Nacin and DD32 described) shows, all it needs
is some unintentionally keen plugin author to come along and flush the
rules at an inopportunely early point and the rewrite rules we added are
no longer in place.
This additional action will make it possible to know that your rewrite
rules are definitely in place each and every time
```flush_rewrite_rules``` gets called.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18450#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list