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 |
---|---|
2452 | wp_nonce_field( $nonce_action ); |
2453 |
|
2454 | /* |
2455 | * Some meta boxes hook into these actions to add hidden input fields in the classic post form. |
2456 | * For backward compatibility, we can capture the output from these actions, |
2457 | * and extract the hidden input fields. |
2458 | */ |
2459 | ob_start(); |
2460 | /** This filter is documented in wp-admin/edit-form-advanced.php */ |
2461 | do_action( 'edit_form_after_title', $post ); |
2462 | /** This filter is documented in wp-admin/edit-form-advanced.php */ |
2463 | do_action( 'edit_form_advanced', $post ); |
2464 | $classic_output = ob_get_clean(); |
2465 |
|
2466 | $classic_elements = wp_html_split( $classic_output ); |
2467 | $hidden_inputs = ''; |
2468 | foreach ( $classic_elements as $element ) { |
2469 | if ( ! str_starts_with( $element, '<input ' ) ) { |
2470 | continue; |