我没有关于管理栏气泡的答案,但下面是如何将其添加到新的管理菜单项中,如下所示:
(注意:这里我得到的是一组重力表单字段的计数,但您可以更改获取计数的位置..显示仍然相同)
function register_my_custom_menu_page() {
$search_criteria = array(
\'status\' => \'active\', //Active forms
\'field_filters\' => array( //which fields to search
array(
\'key\' => \'is_read\', \'value\' => false, // let\'s just get the count for entries that we haven\'t read yet.
)
)
);
// Add the form IDs to the array below, the parent menu will show ALL unread entries for these forms
$notification_count = GFAPI::count_entries( array(1,4,5,6,11,13), $search_criteria );
add_menu_page(
\'Full Quote Form submissions\', // Page Title
// here we\'re going to use the var $notification_count to get ALL the form IDS and their counts... just for the parent menu item
$notification_count ? sprintf( \'Quotes <span class="awaiting-mod">%d</span>\', $notification_count ) : \'View Quotes\',
\'manage_options\', // Capabilities
\'admin.php?page=gf_entries&id=13\', // menu slug
\'\', // callback function
\'dashicons-format-aside\', // icon URL
6 // position
);
}
add_action( \'admin_menu\', \'register_my_custom_menu_page\' );