WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/login header"

(Structure.)
 
(Include information about the function)
Line 1: Line 1:
 
== Description ==
 
== Description ==
+
Outputs the header for the login page.
 
== Usage ==
 
== Usage ==
   
%%% <?php ?> %%%
+
<?php login_header($title, $message, $wp_error) ?>
   
 
== Parameters ==
 
== Parameters ==
  +
{{Parameter|$title|string|Login In Page title to display in <title/> element.|optional|'Log In'}}
  +
{{Parameter|$message|string|Message to display in header|optional|&quot;&quot;}}
  +
{{Parameter|$wp_error|WP_Error|WordPress Error Object|optional|WP_Error}}
   
 
== Examples ==
 
== Examples ==
  +
From wp_login.php:
  +
<pre><?php
  +
$errors = new WP_Error();
  +
...e
  +
login_header(__('Reset Password'), '<p class="message reset-pass">' . __('Enter your new password below.') . '</p>', $errors );
  +
?></pre>
  +
=== Default Usage ===
   
=== Default Usage ===
+
==Actions==
  +
* Calls <tt>login_head</tt> for outputting HTML in the Log In header.
  +
==Filters==
  +
* Calls <tt>login_headerurl</tt> for the top login link.
  +
* Calls <tt>login_headertitle</tt> for the top login title.
  +
* Calls <tt>login_message</tt> on the message to display in the header.
  +
* Calls <tt>login_errors</tt> on the display of the errors object.
  +
* Calls <tt>login_body_class</tt> on the array of class names used for the login page body, additionally passing the <tt>$action</tt>.
   
 
== Change Log ==
 
== Change Log ==
Line 15: Line 25:
 
== Source File ==
 
== Source File ==
   
<tt> </tt> is located in {{Trac| }}
+
<tt>login_header()</tt> is located in {{Trac|wp-login.php}}
   
 
== Related ==
 
== Related ==

Revision as of 18:46, 17 December 2012

Description

Outputs the header for the login page.

Usage

<?php login_header($title, $message, $wp_error) ?>

Parameters

$title
(string) (optional) Login In Page title to display in <title/> element.
Default: 'Log In'
$message
(string) (optional) Message to display in header
Default: ""
$wp_error
(WP_Error) (optional) WordPress Error Object
Default: WP_Error

Examples

From wp_login.php:

<?php
$errors = new WP_Error();
...e 
login_header(__('Reset Password'), '<p class="message reset-pass">' . __('Enter your new password below.') . '</p>', $errors );
?>

Default Usage

Actions

  • Calls login_head for outputting HTML in the Log In header.

Filters

  • Calls login_headerurl for the top login link.
  • Calls login_headertitle for the top login title.
  • Calls login_message on the message to display in the header.
  • Calls login_errors on the display of the errors object.
  • Calls login_body_class on the array of class names used for the login page body, additionally passing the $action.

Change Log

Source File

login_header() is located in wp-login.php

Related