Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: mod_rewrite_rules

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1243
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 = '';