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', 'zakra' ), $theme->Name ); add_theme_page( $theme_page_name, $theme_page_name, 'edit_theme_options', 'zakra-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' ) ) { $zakra_btn_texts = __( 'Activate ThemeGrill Demo Importer Plugin', 'zakra' ); } elseif ( ! file_exists( WP_PLUGIN_DIR . '/themegrill-demo-importer/themegrill-demo-importer.php' ) && is_plugin_inactive( 'themegrill-demo-importer/themegrill-demo-importer.php' ) ) { $zakra_btn_texts = __( 'Install ThemeGrill Demo Importer Plugin', 'zakra' ); } else { $zakra_btn_texts = __( 'Demo Library', 'zakra' ); } $html = '' . esc_html( $zakra_btn_texts . ' 🠪' ) . ''; return $html; } public function option_page() { if ( ! is_child_theme() ) { $theme = wp_get_theme(); } else { $theme = wp_get_theme()->parent(); } $support_link = ( zakra_is_zakra_pro_active() ) ? 'https://zakratheme.com/support-ticket/' : 'https://wordpress.org/support/theme/zakra/'; $pro_feature_links = array( __( 'Header Top Bar', 'zakra' ) => 'https://docs.zakratheme.com/en/article/header-top-bar-overview-pro-40xyxb/', __( 'Header Main Area', 'zakra' ) => 'https://docs.zakratheme.com/en/article/header-main-area-overview-pro-1niwud8/', __( 'Primary Menu', 'zakra' ) => 'https://docs.zakratheme.com/en/article/primary-menu-overview-pro-8ezs4n/', __( 'Mobile Menu', 'zakra' ) => 'https://docs.zakratheme.com/en/article/mobile-menu-overview-pro-18z4iw/', __( 'Layout', 'zakra' ) => 'https://docs.zakratheme.com/en/article/how-to-change-the-sidebar-layout-pro-zju16w/', __( 'Blog/Archive', 'zakra' ) => 'https://docs.zakratheme.com/en/article/blogarchive-overview-pro-2w9ptx/', __( 'Single Post', 'zakra' ) => 'https://docs.zakratheme.com/en/article/single-post-overview-pro-1yc7ew/', __( 'Meta', 'zakra' ) => 'https://docs.zakratheme.com/en/article/meta-overview-pro-1mgawoj/', __( 'Typography', 'zakra' ) => 'https://docs.zakratheme.com/en/article/how-to-change-the-typography-of-the-site-pro-zqpave/', __( 'WooCommerce', 'zakra' ) => 'https://docs.zakratheme.com/en/article/how-to-change-the-layout-of-woocommerce-page-pro-1uci0eh/', __( 'Footer Widgets', 'zakra' ) => 'https://docs.zakratheme.com/en/article/footer-widgets-overview-pro-hhwkyc/', __( 'Footer Bottom Bar', 'zakra' ) => 'https://docs.zakratheme.com/en/article/footer-bottom-bar-overview-pro-783eio/', ); ?>

    $pro_feature_link ) : ?>

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

import_button_html(); ?>

Name ); ?>

Name ); ?>