Title: Codex code causing PHP Deprecated: login_headertitle
Last modified: September 30, 2021

---

# Codex code causing PHP Deprecated: login_headertitle

 *  [chillstarr](https://wordpress.org/support/users/chillstarr/)
 * (@chillstarr)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/codex-code-causing-php-deprecated-login_headertitle/)
 * Hello All
 * I noticed this repeated entry in my debug.log while I had the debugger running:
 * PHP Deprecated: login_headertitle is **deprecated** since version 5.2.0! Use 
   login_headertext instead. Usage of the title attribute on the login logo is not
   recommended for accessibility reasons. Use the link text instead. in /home/xxxxxx/
   xxxxxx.com/wp-includes/functions.php on line 5586
 * I tracked this down to an entry in the child theme’s functions.php which was 
   taken from the WordPress Codex on how to change the login page logo:
 * [https://codex.wordpress.org/Customizing_the_Login_Form#Change_the_Login_Logo](https://codex.wordpress.org/Customizing_the_Login_Form#Change_the_Login_Logo)
 * This section of code is causing the error:
    function my_login_logo_url_title(){
   return ‘Your Site Name and Info’; } add_filter( ‘login_headertitle’, ‘my_login_logo_url_title’);
 * I found this page about the new headertext that’s referred to in the error message:
   
   [https://developer.wordpress.org/reference/hooks/login_headertext/](https://developer.wordpress.org/reference/hooks/login_headertext/)
 * And replacing the old code with the new code resolves the issue:
 * // Customize login header text.
    add_filter( ‘login_headertext’, ‘wpdoc_customize_login_headertext’);
 * function wpdoc_customize_login_headertext( $headertext ) {
    $headertext = esc_html__(‘
   Welcome to WordPress’, ‘plugin-textdomain’ ); return $headertext; }
 * Could anyone let me know how I can alert the Codex admins of the out of date 
   code? I’ve had a search around and couldn’t find a way.
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcodex-code-causing-php-deprecated-login_headertitle%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/codex-code-causing-php-deprecated-login_headertitle/#post-14929317)
 * Thanks for the heads up! I’ve updated the filter name in the example, but left
   the rest as-is.
 * The Codex has been in the process of transitioning to “HelpHub” and other resources,
   so keeping it up to date has become a very low priority.
 * FYI, anyone registered at wordpress.org can edit Codex content. Both a blessing
   and a curse 🙂 It uses a separate login, but accepts your same credentials. You’re
   free to further improve the example code if you like.

Viewing 1 replies (of 1 total)

The topic ‘Codex code causing PHP Deprecated: login_headertitle’ is closed to new
replies.

## Tags

 * [deprecated](https://wordpress.org/support/topic-tag/deprecated/)
 * [login_headertitle](https://wordpress.org/support/topic-tag/login_headertitle/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/codex-code-causing-php-deprecated-login_headertitle/#post-14929317)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
