|Reported by:||Fike||Owned by:|
- If add_rewrite_endpoint() is called just right from plugin file, it will result in standard PHP error, telling that $wp_rewrite isn't initialized yet (call to blahblahblah on a non-object). I guess there should be placed _doing_it_wrong() function explaining that add_rewrite_point should be called during 'init' action (it would be even better if add_rewrite_endpoint() would automatically store passed arguments until 'init' action and would tell developer that his callings are late if add_rewrite_point() is called after uri parsing - as for me, finding the right action during core interaction is VERY complicated).
- add_rewrite_endpoint() doesn't work on my localhost at all (404 is being returned without any additional query vars; i've tried adding endpoint 'json' to EP_ALL, EP_PAGES, EP_PERMALINKS, etc. and calling site/page/json and site/page/json/x), even if i just copy example code and declare new query var through 'query_vars' filter. Tried this on customized theme and on fresh install with twenty-eleven theme with no success.
Change History (3)
Note: See TracTickets for help on using tickets.