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 |
---|---|
1198 | if ( !isset($wp_meta_boxes[$page][$context][$priority]) ) |
1199 | $wp_meta_boxes[$page][$context][$priority] = array(); |
1200 |
|
1201 | $wp_meta_boxes[$page][$context][$priority][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback); |
1202 | } |
1203 |
|
1204 | function do_meta_boxes($page, $context, $object) { |
1205 | global $wp_meta_boxes; |
1206 |
|
1207 | do_action('do_meta_boxes', $page, $context, $object); |
1208 |
|
1209 | if ( !isset($wp_meta_boxes) || !isset($wp_meta_boxes[$page]) || !isset($wp_meta_boxes[$page][$context]) ) |
1210 | return; |
1211 |
|
1212 | foreach ( array('high', 'core', 'default', 'low') as $priority ) { |
1213 | foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { |
1214 | if ( false === $box ) |
1215 | continue; |
1216 | echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . '">' . "\n"; |