*/ namespace RankMath\Admin; use RankMath\Helper; use RankMath\KB; use RankMath\Helpers\Param; defined( 'ABSPATH' ) || exit; /** * Admin Header class. * * @codeCoverageIgnore */ class Admin_Header { /** * Hold current screen ID. * * @var Current screen ID. */ private $screen_id = ''; /** * Display Header. */ public function display() { $logo_url = ''; $this->screen_id = $this->get_current_screen(); ?>

Rank Math SEO

get_search_options(); ?> get_mode_selector(); ?>
admin->display_admin_breadcrumbs(); } /** * Get Search Options. */ private function get_search_options() { if ( ! in_array( $this->screen_id, [ 'rank-math_page_rank-math-options-general', 'rank-math_page_rank-math-options-titles', 'rank-math_page_rank-math-options-sitemap', ], true ) ) { return; } ?>
screen_id, [ 'toplevel_page_rank-math', 'rank-math_page_rank-math-status', ], true ) ) { return; } $is_advanced_mode = Helper::is_advanced_mode(); ?>
'import_export' === Param::get( 'view' ), 'version-control' => 'version_control' === Param::get( 'view' ) || 'rank-math-status' === Param::get( 'page' ), 'general-settings' => 'rank-math-options-general' === Param::get( 'page' ), 'titles-meta' => 'rank-math-options-titles' === Param::get( 'page' ), 'sitemap-general' => 'rank-math-options-sitemap' === Param::get( 'page' ), 'role-manager' => 'rank-math-role-manager' === Param::get( 'page' ), 'seo-analysis' => 'rank-math-seo-analysis' === Param::get( 'page' ), 'content-ai-restore-credits' => 'rank-math-content-ai-page' === Param::get( 'page' ), ]; $link = KB::get( 'knowledgebase', 'RM Header KB Icon' ); foreach ( $links as $key => $value ) { if ( $value ) { $link = KB::get( $key, 'Admin Bar ' . ucwords( str_replace( '-', ' ', $key ) ) ); break; } } return $link; } /** * Get Current Screen ID. */ private function get_current_screen() { $screen = get_current_screen(); if ( empty( $screen ) ) { return ''; } return $screen->id; } }