bp_messages_star_message_css_class( array $retval = array() )

Add CSS class for the current message depending on starred status.

Description

Parameters

$retval

(Optional) Current CSS classes.

Default value: array()

Return

(array)

Source

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

function bp_messages_star_message_css_class( $retval = array() ) {
	if ( true === bp_messages_is_message_starred( bp_get_the_thread_message_id() ) ) {
		$status = 'starred';
	} else {
		$status = 'not-starred';
	}

	// Add css class based on star status for the current message.
	$retval[] = "message-{$status}";

	return $retval;
}

Changelog

Changelog
Version Description
BuddyPress 2.3.0 Introduced.

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.