2 of 2 Improved Formatting

Wordpress php filter admin_body_class not working

I have the following function in a plugin I have built:

static function filter_add_body_classes( $body_classes ) {

    $new_classes = array();

    // Only when logged in
    if ( ! is_user_logged_in() ) {
        return $body_classes;
    }

    // If viewing the site
    if ( ! is_admin() ) {
        $new_classes[] = 'sat-site';
    }

    // If theming is enabled
    if ( Skizzar_Admin_Theme::is_themed() ) {
        $new_classes[] = 'sat-theme';
    }

    // If a custom logo image is provided and the menu logo hiding option is not enabled
    if ( Skizzar_Admin_Theme_Options::get_saved_network_option( 'logo-image' ) && ! Skizzar_Admin_Theme_Options::get_saved_network_option( 'hide-menu-logo' ) ) {
        $new_classes[] = 'sat-custom-logo';
    }

    // If hide-top-paging option is enabled
    if ( Skizzar_Admin_Theme_Options::get_saved_network_option( 'hide-top-paging' ) ) {
        $new_classes[] = 'sat-hide-top-paging';
    }

    // If hide-post-search option is enabled
    if ( Skizzar_Admin_Theme_Options::get_saved_network_option( 'hide-post-search' ) ) {
        $new_classes[] = 'sat-hide-post-search';
    }

    // If hide-top-bulk option is enabled
    if ( Skizzar_Admin_Theme_Options::get_saved_network_option( 'hide-top-bulk' ) ) {
        $new_classes[] = 'sat-hide-top-bulk';
    }

    // If hide-user-role-changer
    if ( Skizzar_Admin_Theme_Options::get_saved_network_option( 'hide-user-role-changer' ) ) {
        $new_classes[] = 'sat-hide-user-role-changer';
    }

    // If hide-view-switch option is enabled
    if ( Skizzar_Admin_Theme_Options::get_saved_network_option( 'hide-view-switch' ) ) {
        $new_classes[] = 'sat-hide-view-switch';
    }

    // If hide-media-bulk-select option is enabled
    if ( Skizzar_Admin_Theme_Options::get_saved_network_option( 'hide-media-bulk-select' ) ) {
        $new_classes[] = 'sat-hide-media-bulk-select';
    }

    // If hide-comment-type-filter option is enabled
    if ( Skizzar_Admin_Theme_Options::get_saved_network_option( 'hide-comment-type-filter' ) ) {
        $new_classes[] = 'sat-hide-comment-type-filter';
    }

    // If enable-notification-center option is enabled
    if ( Skizzar_Admin_Theme_Options::get_saved_network_option( 'enable-notification-center' ) ) {
        $new_classes[] = 'sat-notification-center';
    }

    // Merge & return
    if ( is_array( $body_classes ) ) {
        return array_merge( $body_classes, $new_classes );
    }
    return $body_classes . ' ' . implode( ' ', $new_classes ) . ' ';

}

In my main plugin file I call it in 3 places using the following filters:

add_filter( 'body_class', array( 'Skizzar_Admin_Theme_Setup', 'filter_add_body_classes' ) );
add_filter( 'admin_body_class', array( 'Skizzar_Admin_Theme_Setup', 'filter_add_body_classes' ));
add_filter( 'login_body_class', array( 'Skizzar_Admin_Theme_Setup', 'filter_add_body_classes' ) );

This should add classes to the body based on options users pick for their plugin. The classes should be added to the admin body, site and login page. However, currently, it just adds to the site - so essentially admin_body_class and login_body_class are doing nothing.

Can anyone help me trouble shoot this - not getting any errors, just it's not doing anything