id, array( 'toplevel_page_duplicator', 'duplicator_page_duplicator-tools', 'duplicator_page_duplicator-settings', 'duplicator_page_duplicator-gopro')) ) { return; } $colorScheme = self::getCurrentColorScheme(); $primaryButtonColor = self::getPrimaryButtonColorByScheme(); if ($colorScheme !== false) { ?> name); switch ($name) { case 'blue': return '#e3af55'; case 'light': case 'midnight': return $colorScheme->colors[3]; case 'ocean': case 'ectoplasm': case 'coffee': case 'sunrise': case 'default': default: return $colorScheme->colors[2]; } } public static function getCurrentColorScheme() { global $_wp_admin_css_colors; if (!isset($_wp_admin_css_colors) || !is_array($_wp_admin_css_colors)) { return false; } $colorScheme = get_user_option('admin_color'); if (isset($_wp_admin_css_colors[$colorScheme])) { return $_wp_admin_css_colors[$colorScheme]; } else { return $_wp_admin_css_colors[SnapUtil::arrayKeyFirst($_wp_admin_css_colors)]; } } /** * Get the help support tab view content shown in the help system * * @param string $guide The target URL to navigate to on the online user guide * @param string $faq The target URL to navigate to on the online user tech FAQ * * @return null */ public function getSupportTab($guide, $faq) { $content = __( "Need Help? Please check out these resources first:" . "", 'duplicator' ); $this->screen->add_help_tab(array( 'id' => 'dup_help_tab_callback', 'title' => esc_html__('Support', 'duplicator'), 'content' => "

{$content}

" )); } /** * Get the help support side bar found in the right most part of the help system * * @return null */ public function getHelpSidbar() { $txt_title = __("Resources", 'duplicator'); $txt_home = __("Knowledge Base", 'duplicator'); $txt_guide = __("Full User Guide", 'duplicator'); $txt_faq = __("Technical FAQs", 'duplicator'); $txt_sets = __("Package Settings", 'duplicator'); $this->screen->set_help_sidebar( "
" . esc_html($txt_title) . ":
" . " " . esc_html($txt_home) . "
" . " " . esc_html($txt_guide) . "
" . " " . esc_html($txt_faq) . "
" . " " . esc_html($txt_sets) . "
" ); } }