[wp-hackers] get wp_query object when you have url to post

Konrad Karpieszuk kkarpieszuk at gmail.com
Fri Mar 21 14:03:42 UTC 2014


Actually WordPress does the same thing internally(well it's a bit more
> complicated, but it's about the same) - it goes through all rewrite rules
> until it finds a matching regex pattern.
>

could you show me where it happen? which part of code?

i want to look on this and check how it is done and if it can inspire me



>
> What is the reason behind why you need this functionality?
>

Actually i don't need but i must ;) I work now on some legacy code, which
doesn't work correctly and is quite messy. I see only that it iterates
wp_rewrite rules and match links. I want to check if i can rewrite it in
better way. I tried to patch it but it looks now that it already has too
much patches which just fix one issue and do next one. Code has now about
500 lines and i feel that it is too much.


More information about the wp-hackers mailing list