I'm writing a wordpress plugin, which routes Web addresses to some custom format.
Basically put I wish to get rewrite rules for any given path, can one do that?
so for instance, I want a function the following:
$path = 'team/john-smith' $rules = get_rules($path)
$rules has become something similar to
or else, the particular rewrite rules array (and that i can build the string myself...)
array("team" => "john-cruz", "publish_type" => "team", "title"=> "john-cruz")
Perhaps you have checked out this function in includes/rewrite.php:
My prediction is the fact that to find the actual rewrite rules, you would employ:
global $wordpress_rewrite $rewrite = $wordpress_rewrite->wp_rewrite_rules()
page_rewrite_rules(). There is a couple of interesting searching items of code for the reason that file.