Skip to content

Instantly share code, notes, and snippets.

View neilbannet's full-sized avatar
🌴
On vacation

Zain Neil B Ul Abadin neilbannet

🌴
On vacation
View GitHub Profile
@neilbannet
neilbannet / notification_bubble.php
Last active March 25, 2021 13:19
Update like notification bubble or pending post count bubble with post type name (Admin Menu)
<?php
// Calculate and display count number with any CPT or PT in admin menu (WordPress)
// You can paste this code directly by adding it into your functions.php file or
// Add this line of code at the bottom of functions.php file: include( 'notification_bubble.php' );
// Please take a backup of functions.php file first.
// last updated on: July/24th/2017 06:30PM (London Time)
add_filter( 'add_menu_classes', 'cpt_notification_bubble');
public function cpt_notification_bubble( $menu )
{