support_url = HU_IS_PRO ? esc_url( sprintf( '%ssupport' , 'presscustomizr.com/' ) ) : esc_url('wordpress.org/support/theme/hueman'); //fix #wpfooter absolute positioning in the welcome and about pages add_action( 'admin_print_styles' , array( $this, 'hu_fix_wp_footer_link_style') ); //add welcome page in menu add_action( 'admin_menu' , array( $this , 'hu_add_welcome_page' )); } /** * Extract changelog of latest version from readme.txt file * */ function hu_print_changelog() { if( ! file_exists(HU_BASE."readme.txt") ) { return; } if( ! is_readable(HU_BASE."readme.txt") ) { echo '
The changelog in readme.txt is not readable.
'; return; } $html = ''; $stylelines = explode("\n", implode('', file(HU_BASE."readme.txt"))); $read = false; $is_title = false; foreach ($stylelines as $line) { $is_title = 0 === strpos($line, '= '); //we start reading after current version title if ( 0 === strpos($line, '= '.HUEMAN_VER) ) { $read = true; } if ( ! $read ) continue; if ( $is_title ) { $html .= sprintf( '%1$s%2$s %3$s', HU_WEBSITE . "/category/hueman-releases/", __( "Read the latest release notes" , "hueman" ), is_rtl() ? '«' : '»' ); ?>