WC_Admin_Marketplace_Promotions::append_bubble()private staticWC 1.0

Return the markup for a menu item bubble with a given text.

Method of the class: WC_Admin_Marketplace_Promotions{}

No Hooks.




$result = WC_Admin_Marketplace_Promotions::append_bubble( $menu_item_text, $bubble_text ): string;
$menu_item_text(string) (required)
Text of menu item we want to change.
$bubble_text(string) (required)
Text of bubble.

WC_Admin_Marketplace_Promotions::append_bubble() code WC 9.0.1

private static function append_bubble( string $menu_item_text, string $bubble_text ): string {
	// Strip out update count bubble added by Marketplace::get_marketplace_update_count_html.
	$menu_item_text = preg_replace( '|<span class="update-plugins count-[\d]+">[A-z0-9 <>="-]+</span>|', '', $menu_item_text );

	return $menu_item_text
		. '<span class="awaiting-mod update-plugins remaining-tasks-badge woocommerce-task-list-remaining-tasks-badge">'
		. esc_html( $bubble_text )
		. '</span>';