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 |
|---|---|
| 18 | * backwards compatibility reasons), and again on the 'init' action. We must avoid |
| 19 | * registering rewrite rules before the 'init' action. |
| 20 | */ |
| 21 | function create_initial_taxonomies() { |
| 22 | global $wp_rewrite; |
| 23 | |
| 24 | if ( ! did_action( 'init' ) ) { |
| 25 | $rewrite = array( 'category' => false, 'post_tag' => false, 'post_format' => false ); |
| 26 | } else { |
| 27 | $post_format_base = apply_filters( 'post_format_rewrite_base', 'type' ); |
| 28 | $rewrite = array( |
| 29 | 'category' => array( |
| 30 | 'hierarchical' => true, |
| 31 | 'slug' => get_option('category_base') ? get_option('category_base') : 'category', |
| 32 | 'with_front' => ! get_option('category_base') || $wp_rewrite->using_index_permalinks(), |
| 33 | 'ep_mask' => EP_CATEGORIES, |
| 34 | ), |
| 35 | 'post_tag' => array( |
| 36 | 'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag', |