WC_Admin_Marketplace_Promotions::append_bubble()
Return the markup for a menu item bubble with a given text.
Метод класса: WC_Admin_Marketplace_Promotions{}
Хуков нет.
Возвращает
Строку
.
Использование
$result = WC_Admin_Marketplace_Promotions::append_bubble( $menu_item_text, $bubble_text ): string;
- $menu_item_text(строка) (обязательный)
- Text of menu item we want to change.
- $bubble_text(строка) (обязательный)
- Text of bubble.
Код WC_Admin_Marketplace_Promotions::append_bubble() WC Admin Marketplace Promotions::append bubble WC 9.4.2
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>'; }