WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 920 | } else { |
| 921 | $rules .= "RewriteCond %{REQUEST_FILENAME} !-f\n" . |
| 922 | "RewriteCond %{REQUEST_FILENAME} !-d\n" . |
| 923 | "RewriteRule . {$home_root}{$this->index} [L]\n"; |
| 924 | } |
| 925 | |
| 926 | $rules .= "</IfModule>\n"; |
| 927 | |
| 928 | $rules = apply_filters('mod_rewrite_rules', $rules); |
| 929 | $rules = apply_filters('rewrite_rules', $rules); // Deprecated |
| 930 | |
| 931 | return $rules; |
| 932 | } |
| 933 | |
| 934 | //Add a straight rewrite rule |
| 935 | function add_rule($regex, $redirect, $after = 'bottom') { |
| 936 | //get everything up to the first ? |
| 937 | $index = (strpos($redirect, '?') == false ? strlen($redirect) : strpos($redirect, '?')); |
| 938 | $front = substr($redirect, 0, $index); |