Skip to content

Instantly share code, notes, and snippets.

@ohid
Last active November 13, 2020 17:46
Show Gist options
  • Save ohid/d32645a7a8c02306cd05300745ae5e42 to your computer and use it in GitHub Desktop.
Save ohid/d32645a7a8c02306cd05300745ae5e42 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: [Defender Pro] - Fix masked login URL page style on BuddyBoss theme
* Author: Ohid @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} elseif ( defined( 'WP_CLI' ) && WP_CLI ) {
return;
}
/**
* Add the required body class to the login page body classes to get the proper style
*
* @param array $classes gets the body classes
*
* @return array
*/
function wpmu_login_body_class($classes)
{
if (! isset($classes['login-split-page'])) {
$classes[] = 'login-split-page';
}
return $classes;
}
add_filter('login_body_class', 'wpmu_login_body_class', 99, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment