register_section_type( 'Barter_A13_Customize_Section_Pro' ); // Register sections. $manager->add_section( new Barter_A13_Customize_Section_Pro( $manager, 'barter-pro-theme', array( 'title' => esc_html__( 'Check Our Other Themes', 'barter' ), 'pro_text' => esc_html__( 'Our Themes', 'barter' ), 'pro_url' => 'https://www.sktthemes.org/themes/', 'priority' => 0 ) ) ); } function rating_notice(){ $display_rating_notice = true; $option_name = 'a13_'.BARTER_TPL_SLUG.'_rating'; $rating_option = get_option( $option_name ); if($rating_option !== false){ //we have date saved if($rating_option !== 'disabled'){ $now = time(); //days that passed since last time we displayed rating notice $days = floor(($now - $rating_option) / (60 * 60 * 24)); //less then 2 weeks? if($days < 14){ $display_rating_notice = false; } } //message have been disabled else{ $display_rating_notice = false; } } //they have just installed theme, lets give them a week before asking for rating else{ update_option( $option_name, time() ); $display_rating_notice = false; } if($display_rating_notice){ echo '
'; //text echo '

'.esc_html__( 'Thank you for using Barter theme, we hope everything is working good for you.', 'barter' ).'

'; echo '

'.esc_html__( 'If you have a spare 2 minutes please rate Barter theme. If not, no big deal, just keep on rocking :-)', 'barter' ).'

'; echo '

'.esc_html__( 'SKT Themes', 'barter' ).'

'; //links echo ''; echo '
'; } } function import_notice_check(){ $plugin_path = 'skt-templates/skt-templates.php'; include_once ABSPATH . 'wp-admin/includes/plugin.php';// phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound if ( is_plugin_active( $plugin_path ) ){ return; } if( !barter_is_admin_notice_active( 'fresh_import' ) ){ return; } remove_action('tgmpa_register', 'barter_register_required_plugins'); add_action( 'barter_theme_notices', array( $this, 'import_notice' ) ); } function import_notice(){ echo '
'; /* translators: %s: Theme name */ echo '

'.sprintf( esc_html__( 'Welcome to %s Theme', 'barter' ), esc_html(BARTER_OPTIONS_NAME_PART )).'

'; echo '

'.esc_html__( 'Click on the button below to complete theme installation process..', 'barter' ).'

'; echo '

'.esc_html__( 'Complete Installation', 'barter').'

'; echo '
'; } } //run new Barter_Main_Framework();