comment_form_top
Action HookDescription
Fires at the top of the comment form, inside the form tag.Hook Information
File Location |
wp-includes/comment-template.php
View on GitHub
|
Hook Type | Action |
Line Number | 2743 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into comment_form_top
add_action('comment_form_top', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-includes/comment-template.php:2743
- How this hook is used in WordPress core
<?php
2738 /**
2739 * Fires at the top of the comment form, inside the form tag.
2740 *
2741 * @since 3.0.0
2742 */
2743 do_action( 'comment_form_top' );
2744
2745 if ( is_user_logged_in() ) :
2746
2747 /**
2748 * Filters the 'logged in' message for the comment form for display.
PHP Documentation
<?php
/**
* Fires at the top of the comment form, inside the form tag.
*
* @since 3.0.0
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-includes/comment-template.php
Related Hooks
Related hooks will be displayed here in future updates.