* @copyright Copyright (c) 2013, Nicolas GUILLAUME * @link http://themesandco.com/customizr * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ if ( ! class_exists( 'TC_admin_init' ) ) : class TC_admin_init { static $instance; function __construct () { self::$instance =& $this; global $wp_version; //check WP version to include customizer functions, must be >= 3.4 if (version_compare( $wp_version, '3.4' , '>=' ) ) { //require_once( TC_BASE.'inc/admin/tc_customize.php' ); TC___::$instance -> tc__( array ('admin' => array( array( 'inc/admin' , 'customize'))) ); } else { //adds an information page if version < 3.4 add_action ( 'admin_menu' , array( $this , 'tc_add_fallback_page' )); } //load the meta boxes add_action ( 'admin_init' , array( $this , 'tc_load_meta_boxes' )); //add welcome page in menu add_action ( 'admin_menu' , array( $this , 'tc_add_welcome_page' )); //enqueue additional styling for admin screens add_action ( 'admin_init' , array( $this , 'tc_admin_style' )); //changelog add_action ( 'changelog' , array( $this , 'tc_extract_changelog' )); } /** * load the meta boxes for pages, posts and attachment * @package Customizr * @since Customizr 3.0.4 */ function tc_load_meta_boxes() { //loads meta boxes TC___::$instance -> tc__( array ('admin' => array( array( 'inc/admin' , 'meta_boxes'))) ); } /** * Add fallback admin page. * @package Customizr * @since Customizr 1.1 */ function tc_add_fallback_page() { $theme_page = add_theme_page( __( 'Upgrade WP' , 'customizr' ), // Name of page __( 'Upgrade WP' , 'customizr' ), // Label in menu 'edit_theme_options' , // Capability required 'upgrade_wp.php' , // Menu slug, used to uniquely identify the page array( $this , 'tc_fallback_admin_page' ) //function to be called to output the content of this page ); } /** * Render fallback admin page. * @package Customizr * @since Customizr 1.1 */ function tc_fallback_admin_page() { ?>




Customizr

introduction video or by reading the documentation.
If you don\'t find an answer to your issue, don\'t panic! Since Customizr is used by a growing community of webmasters reporting bugs and making continuous improvements, you will probably find a solution to your problem either in the FAQ or in the user forum.','customizr' ), TC_WEBSITE, TC_WEBSITE.'customizr' ); ?>


(see the changelog) to help you build an awesome website. Watch the introduction video and find inspiration in the showcase.
Enjoy it! ','customizr' ), CUSTOMIZR_VER, TC_WEBSITE ); ?>
tc_is_child() ) : ?>

changelog' ); ?>

We do our best do make Customizr the perfect free theme for you!
Please help support it\'s continued development with a donation of $20, $50, or even $100.','customizr' ) ?>
Make a donation for Customizr

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

The changelog in readme.txt is not readable.

'; return; } $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; } } } }//end of class endif;