• About WordPress
    • About WordPress
    • WordPress.org
    • Documentation
    • Support
    • Feedback
  • Log In
  • Register

WordPress.org

  • Showcase
  • Learn
  • Themes
  • Plugins
  • Mobile
  • Support
    • Documentation
    • Forums
  • Get Involved
    • Five for the Future
  • About
  • Blog
  • Hosting
  • Get WordPress

Code Reference

Skip to content
Filter by type:
Search
Browse: Home / Reference / Hooks / login_body_class

apply_filters( 'login_body_class', array $classes, string $action )

Filters the login page body classes.

Contents

  • Parameters
  • Source
  • Related
    • Used By
  • Changelog
  • User Contributed Notes

Parameters #Parameters

$classes

(array) An array of body classes.

$action

(string) The action that brought the visitor to the login page.


Top ↑

Source #Source

File: wp-login.php

View on Trac


Top ↑

Related #Related

Used By #Used By

Used By
Used By Description
wp-login.php: login_header()

Output the login page header.


Top ↑

Changelog #Changelog

Changelog
Version Description
3.5.0 Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

  1. Skip to note 1 content
    You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note
    Contributed by stevenlinx — 4 weeks ago

    Example migrated from Codex:

    Adds the .my-login-class body class to the login screen:

    add_filter( 'login_body_class', 'login_classes' );
    
    function login_classes( $classes ) {
    	$classes[] = 'my-login-class';
    	return $classes;
    }
    
    Log in to add feedback

You must log in before being able to contribute a note or feedback.

  • About
  • Blog
  • Hosting
  • Donate
  • Support
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
  • @WordPress
  • WordPress

Code is Poetry.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.