Source View: login_form_top

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: 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.

Source View

Line Code
268                               'id_submit' => 'wp-submit',
269                               'remember' => true,
270                               'value_username' => '',
271                               'value_remember' => false, // Set this to true to default the "Remember me" checkbox to checked
272                          );
273      $args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
274
275      $form = '
276           <form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url( site_url( 'wp-login.php', 'login_post' ) ) . '" method="post">
277                ' . apply_filters( 'login_form_top', '', $args ) . '
278                <p class="login-username">
279                     <label for="' . esc_attr( $args['id_username'] ) . '">' . esc_html( $args['label_username'] ) . '</label>
280                     <input type="text" name="log" id="' . esc_attr( $args['id_username'] ) . '" class="input" value="' . esc_attr( $args['value_username'] ) . '" size="20" />
281                </p>
282                <p class="login-password">
283                     <label for="' . esc_attr( $args['id_password'] ) . '">' . esc_html( $args['label_password'] ) . '</label>
284                     <input type="password" name="pwd" id="' . esc_attr( $args['id_password'] ) . '" class="input" value="" size="20" />
285                </p>
286                ' . apply_filters( 'login_form_middle', '', $args ) . '