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 |
|---|---|
| 145 | |
| 146 | if ( post_type_supports($post_type, 'author') ) { |
| 147 | if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) ) |
| 148 | add_meta_box('authordiv', __('Author'), 'post_author_meta_box', null, 'normal', 'core'); |
| 149 | } |
| 150 | |
| 151 | if ( post_type_supports($post_type, 'revisions') && 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) |
| 152 | add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core'); |
| 153 | |
| 154 | do_action('add_meta_boxes', $post_type, $post); |
| 155 | do_action('add_meta_boxes_' . $post_type, $post); |
| 156 | |
| 157 | do_action('do_meta_boxes', $post_type, 'normal', $post); |
| 158 | do_action('do_meta_boxes', $post_type, 'advanced', $post); |
| 159 | do_action('do_meta_boxes', $post_type, 'side', $post); |
| 160 | |
| 161 | add_screen_option('layout_columns', array('max' => 2, 'default' => 2) ); |
| 162 | |
| 163 | if ( 'post' == $post_type ) { |