* @copyright Copyright (c) 2016, Benone Bitencourt * @link http://seagroup.co/brazil * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ if ( ! class_exists( 'TC_admin_page' ) ) : class TC_admin_page { static $instance; public $support_url; function __construct () { self::$instance =& $this; //add welcome page in menu add_action( 'admin_menu' , array( $this , 'tc_add_welcome_page' )); //changelog add_action( '__after_welcome_panel' , array( $this , 'tc_extract_changelog' )); //config infos add_action( '__after_welcome_panel' , array( $this , 'tc_config_infos' ), 20 ); //build the support url $this -> support_url = TC___::tc_is_pro() ? esc_url( sprintf('%ssupport' , TC_WEBSITE ) ) : esc_url('wordpress.org/support/theme/customizr'); //fix #wpfooter absolute positioning in the welcome and about pages add_action( 'admin_print_styles' , array( $this, 'tc_fix_wp_footer_link_style') ); } /** * Add fallback admin page. * @package Customizr * @since Customizr 1.1 */ function tc_add_welcome_page() { $_name = __( 'About BRAZIL' , 'customizr' ); $theme_page = add_theme_page( $_name, // Name of page $_name, // Label in menu 'edit_theme_options' , // Capability required 'welcome.php' , // Menu slug, used to uniquely identify the page array( $this , 'tc_welcome_panel' ) //function to be called to output the content of this page ); } /** * Render welcome admin page. * @package Customizr * @since Customizr 3.0.4 */ function tc_welcome_panel() { $is_help = isset($_GET['help']) ? true : false; $_faq_url = esc_url('http://seagroup.co/brazil/'); $_support_url = $this -> support_url; $_theme_name = 'BRAZIL'; do_action('__before_welcome_panel'); ?>
%1$s %2$s ?', __( "Need help with", "customizr" ), $_theme_name ); } else { printf( '

%1$s %2$s %3$s

', __( "Welcome to", "customizr" ), $_theme_name, CUSTOMIZR_VER ); } ?>
%1$s

', sprintf( __( "The best way to start is to read the %s." , "customizr" ), sprintf('%2$s', esc_url('seagroup.co'), __("documentation" , "customizr") ) ) ); printf( '

%1$s

%2$s

', __( "If you don't find an answer to your issue in the documentation, don't panic! If you bought the BRAZIL theme, you have support! Chances are that it's already been reported and fixed in the support forums.", "customizr" ), sprintf( __( "The easiest way to search in the support forums is to use our Google powered search engine on our %s.", "customizr" ), sprintf('%2$s', esc_url('seagroup.co'), __("home page" , "customizr") ) ) ); ?>


%1$s %2$s (%3$s)

', sprintf( __( "Thank you for using %s!", "customizr" ), $_theme_name ), sprintf( __( "%s %s has more features, is safer and more stable than ever to help you designing an awesome website.", "customizr" ), $_theme_name, CUSTOMIZR_VER ), __( "check the changelog", "customizr") ); printf( '

%1$s

', sprintf( __( "The best way to start with %s is to read the %s and visit the %s.", "customizr"), $_theme_name, sprintf( '%2$s', esc_url('seagroup.co/brazil/docs'), __("documentation", "customizr") ), sprintf( '%2$s', esc_url('seagroup.co/brazil/'), __("demo website", "customizr") ) ) ); ?>
tc_is_child() ) : ?>

changelog' ); ?>

We do our best do make Brazil the perfect theme for you!
Please help support it\'s continued development with a donation.','customizr' ) ?>

(We are addicted to your feedbacks...)','customizr' ) ?>
Review BRAZIL »

We offer support for buyers
Skype: benone.bitencourt
Phone: +55-51-4042-2828
Email: contact@seagroup.co

The changelog in readme.txt is not readable.

'; return; } ob_start(); $stylelines = explode("\n", implode('', file(TC_BASE."readme.txt"))); $read = false; $i = 0; foreach ($stylelines as $line) { //echo 'i = '.$i.'|read = '.$read.'pos = '.strpos($line, '= ').'|line :'.$line.'
'; //we stop reading if we reach the next version change if ($i == 1 && strpos($line, '= ') === 0 ) { $read = false; $i = 0; } //we write the line if between current and previous version if ($read) { echo $line.'
'; } //we skip all lines before the current version changelog if ($line != strpos($line, '= '.CUSTOMIZR_VER)) { if ($i == 0) { $read = false; } } //we begin to read after current version title else { $read = true; $i = 1; } } $html = ob_get_contents(); if ($html) ob_end_clean(); ?>

id ) return; ?>