bp3dv_fs()->can_use_premium_code() ]); } } if (!bp3dv_fs()->can_use_premium_code() && !isset($_GET['id']) && !isset($_GET['post'])) { add_action('admin_bar_menu', function (\WP_Admin_Bar $admin_bar) { if (! current_user_can('manage_options')) { return; } $admin_bar->add_menu(array( 'id' => 'bp3d_offer_menu', 'parent' => 'top-secondary', 'group' => null, 'title' => '40% Off Black Friday!', //you can use img tag with image link. it will show the image icon Instead of the title. 'href' => admin_url('edit.php?post_type=bp3d-model-viewer&page=3d-viewer-pricing-manual'), 'meta' => [ 'title' => __('40% Off Black Friday!', 'h5vp'), //This title will show on hover ] )); }, 500); add_action('init', function () { add_submenu_page( '', __('Upgrade', 'textdomain'), __('Upgrade', 'textdomain'), 'manage_options', '3d-viewer-pricing-manual', function () { ?>