Skip to:
Content

BuddyPress.org

Changeset 6803


Ignore:
Timestamp:
02/19/2013 09:37:43 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Add "BuddyPress" to body class if on a BuddyPress page. Fixes #4836.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-template.php

    r6783 r6803  
    17751775        }
    17761776
    1777         // Merge WP classes with BP classes
    1778         $classes = array_merge( (array) $bp_classes, (array) $wp_classes );
    1779 
    1780         // Remove any duplicates
    1781         $classes = array_unique( $classes );
     1777        /** Clean up **********************************************************/
     1778
     1779        // Add BuddyPress class if we are within a BuddyPress page
     1780        if ( !empty( $bp_classes ) ) {
     1781            $bp_classes[] = 'BuddyPress';
     1782        }
     1783
     1784        // Merge WP classes with BP classes and remove any duplicates
     1785        $classes = array_unique( array_merge( (array) $bp_classes, (array) $wp_classes ) );
    17821786
    17831787        return apply_filters( 'bp_get_the_body_class', $classes, $bp_classes, $wp_classes, $custom_classes );
Note: See TracChangeset for help on using the changeset viewer.