BP_Core_Members_Switching::admin_bar_link_color_scheme()

Returns background and color value base on current color scheme

Description

Return

(array) Should the array contain background and text color

Source

File: bp-members/classes/class-bp-core-members-switching.php

	public static function admin_bar_link_color_scheme() {
		$current_color = get_user_option( 'admin_color' );
		switch ( $current_color ) {
			case 'fresh':
				return [ 'background' => '#0073aa', 'color' => '#fff' ];
				break;
			case 'light':
				return [ 'background' => '#888', 'color' => '#fff' ];
				break;
			case 'blue':
				return [ 'background' => '#096484', 'color' => '#fff' ];
				break;
			case 'coffee':
				return [ 'background' => '#c7a589', 'color' => '#fff' ];
				break;
			case 'ectoplasm':
				return [ 'background' => '#a3b745', 'color' => '#fff' ];
			case 'midnight':
				return [ 'background' => '#e14d43', 'color' => '#fff' ];
			case 'ocean':
				return [ 'background' => '#9ebaa0', 'color' => '#fff' ];
			case 'sunrise':
				return [ 'background' => '#dd823b', 'color' => '#fff' ];
				break;
		}
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.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.