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 |
---|---|
1244 | if (strstr($query, $this->index)) { |
1245 | $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n"; |
1246 | } else { |
1247 | $rules .= 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA,L]\n"; |
1248 | } |
1249 | } |
1250 | $rules .= "</IfModule>\n"; |
1251 |
|
1252 | $rules = apply_filters('mod_rewrite_rules', $rules); |
1253 | $rules = apply_filters('rewrite_rules', $rules); // Deprecated |
1254 |
|
1255 | return $rules; |
1256 | } |
1257 |
|
1258 | function init() { |
1259 | $this->permalink_structure = get_settings('permalink_structure'); |
1260 | $this->front = substr($this->permalink_structure, 0, strpos($this->permalink_structure, '%')); |
1261 | $this->root = ''; |
1262 | if ($this->using_index_permalinks()) { |