Source View: 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.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: 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.

Source View

Line Code
1373           } else {
1374                $rules .= "RewriteCond %{REQUEST_FILENAME} !-f\n" .
1375                     "RewriteCond %{REQUEST_FILENAME} !-d\n" .
1376                     "RewriteRule . {$home_root}{$this->index}\n";
1377           }
1378
1379           $rules .= "</IfModule>\n";
1380
1381           $rules = apply_filters('mod_rewrite_rules', $rules);
1382           $rules = apply_filters('rewrite_rules', $rules);  // Deprecated
1383
1384           return $rules;
1385      }
1386
1387      function init() {
1388           $this->permalink_structure = get_settings('permalink_structure');
1389           $this->front = substr($this->permalink_structure, 0, strpos($this->permalink_structure, '%'));          
1390           $this->root = '';
1391           if ($this->using_index_permalinks()) {