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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
2212 | */ |
2213 | $fields = apply_filters( 'comment_form_default_fields', $fields ); |
2214 | $defaults = array( |
2215 | 'fields' => $fields, |
2216 | 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" aria-required="true" required="required"></textarea></p>', |
2217 | /** This filter is documented in wp-includes/link-template.php */ |
2218 | 'must_log_in' => '<p class="must-log-in">' . sprintf( |
2219 | /* translators: %s: login URL */ |
2220 | __( 'You must be <a href="%s">logged in</a> to post a comment.' ), |
2221 | wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) |
2222 | ) . '</p>', |
2223 | /** This filter is documented in wp-includes/link-template.php */ |
2224 | 'logged_in_as' => '<p class="logged-in-as">' . sprintf( |
2225 | /* translators: 1: edit user link, 2: accessibility text, 3: user name, 4: logout URL */ |
2226 | __( '<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>' ), |
2227 | get_edit_user_link(), |
2228 | /* translators: %s: user name */ |
2229 | esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ), |
2230 | $user_identity, |
2231 | wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) |
2232 | ) . '</p>', |
2233 | 'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>', |
2234 | 'comment_notes_after' => '', |
2235 | 'action' => site_url( '/wp-comments-post.php' ), |
2236 | 'id_form' => 'commentform', |
2237 | 'id_submit' => 'submit', |
2238 | 'class_form' => 'comment-form', |
2239 | 'class_submit' => 'submit', |
2240 | 'name_submit' => 'submit', |