get( 'Name' ) ); $this->boards = apply_filters('brendah_admin_boards', array(), 'brendah'); //Hook into the brendah welcome action add_action( 'brendah_welcome', array( $this, 'welcome_css' ), 10 ); add_action( 'brendah_welcome', array( $this, 'welcome_intro' ), 20 ); add_action( 'brendah_welcome', array( $this, 'welcome_boards' ), 30 ); add_action( 'brendah_welcome', array( $this, 'welcome_js' ), 40 ); } /** * Adds an admin notice upon successful activation. * * @since 1.0.3 */ public function activation_admin_notice() { global $pagenow; if ( is_admin() && 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) { // Input var okay. add_action( 'admin_notices', array( $this, 'brendah_welcome_admin_notice' ), 99 ); } } /** * Display an admin notice linking to the welcome screen * * @since 1.0.3 */ public function brendah_welcome_admin_notice() { ?>

', '' ); ?>

boards; include( get_template_directory() . '/inc/welcome-screen/component-boards.php' ); } /** * Welcome screen js section * * @since 1.0.0 */ public function welcome_js() { require_once( get_template_directory() . '/inc/welcome-screen/component-js.php' ); } /** * Welcome screen css section * * @since 1.0.0 */ public function welcome_css() { require_once( get_template_directory() . '/inc/welcome-screen/component-css.php' ); } /** * Returns an install woocommerce link * * @since 1.0.0 */ public function get_woocommerce_link() { if ( class_exists( 'WooCommerce' ) ) return '

' . esc_html__( 'WooCommerce is activated', 'brendah' ) . '

'; $url = esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' ) ); $msg = esc_html__( 'Install', 'brendah' ); return "$msg"; } /** * Returns an install als link * * @since 1.0.0 */ public function get_als_link() { if ( class_exists( 'alsSearch' ) ) return '

' . esc_html__( 'Ajax Live Search is activated', 'brendah' ) . '

'; $url = esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=ajax-live-search' ), 'install-plugin_ajax-live-search' ) ); $msg = esc_html__( 'Install', 'brendah' ); $url2 = esc_url( 'https://ajaxlivesearch.xyz' ); $msg2 = esc_html__( 'Learn More!', 'brendah' ); return "$msg $msg2"; } /** * Returns a donate als link * * @since 1.0.0 */ public function get_donate_link() { if ( defined( 'ALS_IS_PRO') ) return '

' . esc_html__( 'Ojoo! You are already using the premium version of Ajax Live Search.', 'brendah' ) . '

'; $url = esc_url( 'https://ajaxlivesearch.xyz/download/#buy' ); $msg = esc_html__( 'Get It!', 'brendah' ); return "$msg"; } /** * Returns a link to the customizer * * @since 1.0.0 */ public function get_customizer_link() { //Sets the return url $return = self_admin_url( 'themes.php?page=brendah-welcome' ); //customizer url $url = esc_url( self_admin_url( "customize.php?return=$return" ) ); $msg = esc_html__( 'Customize', 'brendah' ); return "$msg"; } /** * Returns a link to the customizer * * @since 1.0.0 */ public function get_contribute_link() { //Sets the return url $return = self_admin_url( 'themes.php?page=brendah-welcome' ); //customizer url $url = esc_url( 'https://translate.wordpress.org/projects/wp-themes/brendah' ); $msg = esc_html__( 'Translate ', 'brendah' ); $url2 = esc_url( 'https://github.com/picocodes/brendah' ); $msg2 = esc_html__( ' GitHub', 'brendah' ); return "$msg $msg2"; } /** * Welcome page boards * * @since 1.0.0 */ public function admin_boards($boards, $package ='brendah' ) { if ( is_array( $boards) ) { //Customizer $boards['customize-brendah'] = array( 'title' => esc_html__( 'Customize Brendah', 'brendah' ), 'description' => esc_html__( 'Brendah fully integrates with the customizer to enable you set custom colors and layout options.', 'brendah' ), 'link' => $this->get_customizer_link(), ); //Contribute $boards['contribute-brendah'] = array( 'title' => esc_html__( 'Contribute to Brendah', 'brendah' ), 'description' => esc_html__( 'Use github to report a bug or send a pull request. You can also help translate Brendah on WordPress.', 'brendah' ), 'link' => $this->get_contribute_link(), ); } return $boards; } } endif; return new Brendah_Admin();