edit_form_top
Action HookDescription
Fires at the beginning of the edit form. At this point, the required hidden fields and nonces have already been output.Hook Information
File Location |
wp-admin/edit-form-advanced.php
View on GitHub
|
Hook Type | Action |
Line Number | 519 |
Hook Parameters
Type | Name | Description |
---|---|---|
WP_Post
|
$post
|
Post object. |
Usage Examples
Basic Usage
<?php
// Hook into edit_form_top
add_action('edit_form_top', 'my_custom_function', 10, 1);
function my_custom_function($post) {
// Your custom code here
}
Source Code Context
wp-admin/edit-form-advanced.php:519
- How this hook is used in WordPress core
<?php
514 *
515 * @since 3.7.0
516 *
517 * @param WP_Post $post Post object.
518 */
519 do_action( 'edit_form_top', $post );
520 ?>
521
522 <div id="poststuff">
523 <div id="post-body" class="metabox-holder columns-<?php echo ( 1 === get_current_screen()->get_columns() ) ? '1' : '2'; ?>">
524 <div id="post-body-content">
PHP Documentation
<?php
/**
* Fires at the beginning of the edit form.
*
* At this point, the required hidden fields and nonces have already been output.
*
* @since 3.7.0
*
* @param WP_Post $post Post object.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-admin/edit-form-advanced.php
Related Hooks
Related hooks will be displayed here in future updates.