theme_name = apply_filters( 'bcf_theme_name', 'Business Consultant Finder'); $this->pro_url = apply_filters( 'bcf_pro_url', 'https://athemeart.com/downloads/business-consultant-finder/'); add_action( 'admin_menu', array( $this, 'admin_menu',5 ) ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_action( 'admin_notices', array( $this, 'admin_notices' ), 99 ); add_action( 'wp_ajax_business_consultant_finder_dismiss_notice', array( $this, 'dismiss_nux' ) ); add_action( 'athemeart_theme_helper', array( $this, 'athemeart_theme_helper' ), 5 ); add_action( 'admin_menu', array( $this, 'admin_menu' ) ); } /** * Enqueue scripts. * */ public function enqueue_scripts() { global $wp_customize; if ( isset( $wp_customize ) ) { return; } wp_enqueue_script( 'plugin-install' ); wp_enqueue_script( 'updates' ); wp_enqueue_style( 'business-consultant-finder-admin', get_template_directory_uri() . '/assets/admin/admin.css', '', '1' ); wp_enqueue_script( 'business-consultant-finder-admin', get_template_directory_uri() . '/assets/admin/admin.js', array( 'jquery', 'updates' ), '1', 'all' ); $business_consultant_finder_notify = array( 'nonce' => wp_create_nonce( 'business_consultant_finder_notice_dismiss' ) ); wp_localize_script( 'business-consultant-finder-admin', 'businessconsultantfinderNUX', $business_consultant_finder_notify ); } /** * Output admin notices. * */ public function admin_notices() { global $pagenow; if ( ( 'themes.php' == $pagenow ) && isset( $_GET[ 'page' ] ) || get_option( 'business_consultant_finder_admin_notice_dismissed' ) ) { return; } ?>
'; esc_html_e( ' You have installed aThemeArt Theme Helper. Activate it to take advantage of this theme\'s features in the customizer, one click demo import.', 'business-consultant-finder' ); echo ''; $plugin_link_suffix = 'athemeart-theme-helper/athemeart-theme-helper.php'; $nonce = add_query_arg( array( 'action' => 'activate', 'plugin' => rawurlencode( $plugin_link_suffix ), 'plugin_status' => 'all', 'paged' => '1', '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin_link_suffix ), ), network_admin_url( 'plugins.php' ) ); ?> '; esc_html_e( ' To take full advantage of all the features this theme has to offer, please install and activate the aThemeArt Theme Helper plugin.', 'business-consultant-finder' ); echo ''; ?>'install-plugin', 'plugin' => 'athemeart-theme-helper', ), self_admin_url( 'update.php' ) ); return wp_nonce_url( $plugin_install_url, 'install-plugin_athemeart-theme-helper' ); } /** * Add admin menu. */ public function admin_menu() { $page = add_theme_page( esc_attr__( 'Business Consultant Finder', 'business-consultant-finder' ) , esc_attr__( 'Business Consultant Finder', 'business-consultant-finder' ), 'activate_plugins', 'welcome', array( $this, 'welcome_screen' ) ); } /** * Welcome screen page. */ public function welcome_screen() { ?>