setup_hooks(); } private function setup_hooks() { add_action( 'admin_menu', array( $this, 'create_menu' ) ); } public function create_menu() { if ( ! is_child_theme() ) { $theme = wp_get_theme(); } else { $theme = wp_get_theme()->parent(); } /* translators: %s: Theme Name. */ $theme_page_name = sprintf( esc_html__( '%s Options', 'colormag' ), $theme->Name ); add_theme_page( $theme_page_name, $theme_page_name, 'edit_theme_options', 'colormag-options', array( $this, 'option_page', ) ); } public function import_button_html() { // Check if TDI is installed but not activated or not installed at all or installed and activated. if ( file_exists( WP_PLUGIN_DIR . '/themegrill-demo-importer/themegrill-demo-importer.php' ) && is_plugin_inactive( 'themegrill-demo-importer/themegrill-demo-importer.php' ) ) { $colormag_btn_texts = __( 'Activate ThemeGrill Demo Importer Plugin', 'colormag' ); } elseif ( ! file_exists( WP_PLUGIN_DIR . '/themegrill-demo-importer/themegrill-demo-importer.php' ) && is_plugin_inactive( 'themegrill-demo-importer/themegrill-demo-importer.php' ) ) { $colormag_btn_texts = __( 'Install ThemeGrill Demo Importer Plugin', 'colormag' ); } else { $colormag_btn_texts = __( 'Demo Library', 'colormag' ); } $html = '' . esc_html( $colormag_btn_texts . ' 🠪' ) . ''; return $html; } public function option_page() { if ( ! is_child_theme() ) { $theme = wp_get_theme(); } else { $theme = wp_get_theme()->parent(); } $support_link = 'https://themegrill.com/contact/'; $pro_feature_links = array( __( 'Top Bar', 'colormag' ) => 'https://docs.themegrill.com/colormag/customize-top-bar', __( 'Main Header', 'colormag' ) => 'https://docs.themegrill.com/colormag/manage-main-header-layout-and-styles', __( 'Primary Menu', 'colormag' ) => 'https://docs.themegrill.com/colormag/customize-the-primary-menu-of-the-site', __( 'Blog', 'colormag' ) => 'https://docs.themegrill.com/colormag/manage-blog-page-layout', __( 'Meta', 'colormag' ) => 'https://docs.themegrill.com/colormag/customize-the-post-meta', __( 'Footer Column', 'colormag' ) => 'https://docs.themegrill.com/colormag/customize-footer-column', __( 'Footer Bar', 'colormag' ) => 'https://docs.themegrill.com/colormag/customize-footer-bar-layout-styles', ); ?>

    $pro_feature_link ) : ?>

Name, '' . esc_html__( 'Demos.', 'colormag' ) . '' ); ?>

import_button_html(); ?>

Name ); ?>

Name, // '' . esc_html__( 'here 🠪', 'colormag' ) . '' // ); // ?>