bp_get_the_thread_message_alt_class()

Get the CSS class used for message zebra striping.

Description

Return

(string)

Source

File: bp-messages/bp-messages-template.php

1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
function bp_get_the_thread_message_alt_class() {
    global $thread_template;
 
    if ( $thread_template->current_message % 2 == 1 ) {
        $class = 'even alt';
    } else {
        $class = 'odd';
    }
 
    /**
     * Filters the CSS class used for message zebra striping.
     *
     * @since BuddyPress 1.1.0
     *
     * @param string $class Class determined to be next for zebra striping effect.
     */
    return apply_filters( 'bp_get_the_thread_message_alt_class', $class );
}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.