#wp-admin-bar-rankify-upgrade > .ab-item { color: #fff !important; font-weight: 500 !important; font-size: 12px !important; line-height: 1 !important; background: linear-gradient(to right, #7c3aed, #4f46e5) !important; padding: 10px !important; height: auto !important; margin: 7px 10px 5px 10px !important; display: flex !important; align-items: center !important; justify-content: center !important; border-radius: 6px !important; border: 1px solid transparent !important; text-decoration: none !important; }'; } public function addMenuItems($adminBar) { if (!current_user_can('manage_options')) { return; } $adminBar->add_menu([ 'id' => 'rankify', 'title' => 'Crownify', 'href' => admin_url('admin.php?page=rankify-overview'), ]); $adminBar->add_menu([ 'id' => 'rankify-status', 'parent' => 'rankify', 'title' => $this->statusTitle(), 'href' => admin_url('admin.php?page=rankify-overview'), ]); $adminBar->add_menu([ 'id' => 'rankify-overview', 'parent' => 'rankify', 'title' => __('Overview', 'crownify'), 'href' => admin_url('admin.php?page=rankify-overview'), ]); $adminBar->add_menu([ 'id' => 'rankify-settings', 'parent' => 'rankify', 'title' => __('Settings', 'crownify'), 'href' => admin_url('admin.php?page=rankify-settings'), ]); if (!Utils::hasActivePro()) { $adminBar->add_menu([ 'id' => 'rankify-upgrade', 'parent' => 'rankify', 'title' => Utils::getUpgradeLabel(), // Via the SDK so the link follows the install's licence state. Admin\UI // filters Freemius' `pricing_url` onto Utils::getUpgradeUrl(), so this // opens the Pro popup without a second hardcoded copy of the URL. 'href' => \DaftPlug\Rankify\rankify_pro()->get_upgrade_url(), ]); } } /** * First child item: the one status worth seeing from any page. */ private function statusTitle() { if (!get_option('blog_public')) { return __('Search engines blocked', 'crownify'); } return __('Indexing allowed', 'crownify'); } }