WC_Admin_Marketplace_Promotions::append_bubble
Return the markup for a menu item bubble with a given text.
Method of the class: WC_Admin_Marketplace_Promotions{}
No Hooks.
Returns
String.
Usage
$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() WC Admin Marketplace Promotions::append bubble code WC 10.3.3
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>';
}