﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
21335,add_rewrite_endpoint() malfunction,Fike,,"1. 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).
2. 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.",defect (bug),closed,normal,,Rewrite Rules,3.4.1,minor,invalid,,
