示例#1
0
function ktz_themes_info()
{
    $xml = ktz_latest_theme(11600);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    $kentooz_theme = wp_get_theme();
    $ktzinfotheme = '<div class="format-setting-wrap"><div class="format-setting-label"><h3 class="label"><strong>System Information</strong></h3></div>';
    $ktzinfotheme .= '<ul>';
    $ktzinfotheme .= '<li><strong>Theme Name:</strong> ' . $kentooz_theme->Name . '</li>';
    $ktzinfotheme .= '<li><strong>Theme Version:</strong> ' . $kentooz_theme->Version . '</li>';
    $ktzinfotheme .= '<li><strong>Author:</strong> ' . $kentooz_theme->get('ThemeURI') . '</li>';
    $ktzinfotheme .= '<li><strong>Home URL:</strong>' . home_url() . '</li>';
    $ktzinfotheme .= '<li><strong>Site URL:</strong>' . site_url() . '</li>';
    if (is_multisite()) {
        $ktzinfotheme .= '<li><strong>WordPress Version:</strong>' . 'WPMU ' . get_bloginfo('version') . '</li>';
    } else {
        $ktzinfotheme .= '<li><strong>WordPress Version:</strong>' . 'WP ' . get_bloginfo('version') . '</li>';
    }
    if (function_exists('phpversion')) {
        $ktzinfotheme .= '<li><strong>PHP Version:</strong>' . esc_html(phpversion()) . '</li>';
    }
    if (function_exists('size_format')) {
        $ktzinfotheme .= '<li><strong>Memory Limit:</strong>';
        $mem_limit = ktz_let_to_num(WP_MEMORY_LIMIT);
        if ($mem_limit < 67108864) {
            $ktzinfotheme .= '<mark class="error">' . size_format($mem_limit) . ' - Recommended memory to at least 64MB. Please see: <a href="http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">Increasing memory allocated to PHP</a></mark>';
        } else {
            $ktzinfotheme .= '<mark class="yes">' . size_format($mem_limit) . '</mark>';
        }
        $ktzinfotheme .= '</li>';
        $ktzinfotheme .= '<li><strong>WP Max Upload Size:</strong>' . size_format(wp_max_upload_size()) . ' - Recommended is 2MB (Find tutorial about it in <a href="https://www.google.com/#q=WP+Max+Upload+Size" target="_blank">Google</a>)</li>';
    }
    if (function_exists('ini_get')) {
        $ktzinfotheme .= '<li><strong>PHP Time Limit:</strong>' . ini_get('max_execution_time') . '</li>';
    }
    if (defined('WP_DEBUG') && WP_DEBUG) {
        $ktzinfotheme .= '<li><strong>WP Debug Mode:</strong><mark class="yes"><b>Yes</b> - If life website please turn off WP debug mode. Please see: <a href="http://codex.wordpress.org/Debugging_in_WordPress" target="_blank">Debugging in WordPress</a></mark></mark></li>';
    } else {
        $ktzinfotheme .= '<li><strong>WP Debug Mode:</strong><mark class="no">No</mark></li>';
    }
    $ktzinfotheme .= '</ul></div>';
    $ktzinfotheme .= '<div class="format-setting-wrap">';
    $ktzinfotheme .= '<div class="format-setting-label"><h3 class="label"><strong>Latest release themes from kentooz</strong></h3></div>';
    $ktzinfotheme .= $xml->ktzlatestthemes;
    $ktzinfotheme .= '</div>';
    return $ktzinfotheme;
}
示例#2
0
function update_notifier()
{
    $xml = get_latest_theme_version(21600);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    $xml_latestrelease = ktz_latest_theme(21600);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    $kentooz_theme = wp_get_theme();
    // Get theme data from style.css (current version is what we want)
    ?>
	
	<style>
		.update-nag {display: none;}
		#instructions {max-width: 800px;}
		h3.title {margin: 30px 0 0 0; padding: 30px 0 0 0; border-top: 1px solid #ddd;}
	</style>

	<div class="wrap">
	
		<div id="icon-tools" class="icon32"></div>
		<h2><?php 
    echo $kentooz_theme->Name;
    ?>
 Theme Updates</h2>
	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo $kentooz_theme->Name;
    ?>
 theme available.</strong> You have version <?php 
    echo $kentooz_theme->Version;
    ?>
 installed. Update to version <?php 
    echo $xml->latest;
    ?>
.</p></div>
        
        <img style="float: left; margin: 0 20px 20px 0; border: 1px solid #ddd;" src="<?php 
    echo get_bloginfo('template_url') . '/screenshot.png';
    ?>
" />
        
        <div id="instructions" style="max-width: 800px;">
            <h3>Update Download and Instructions</h3>
            <p><strong>Please note:</strong> make a <strong>backup</strong> of the Theme inside your WordPress installation folder <strong>/wp-content/themes/<?php 
    echo strtolower($kentooz_theme->Name);
    ?>
/</strong></p>
            <p>To update the Theme, go to <a href="http://member.kentooz.com/login">http://member.kentooz.com/login</a> or link where you download this themes (for free theme), login to your kentooz account or download theme where you download before, head over to your <strong>downloads</strong> section and re-download the theme like you did when you bought it or download it.</p>
            <p>Extract the zip's contents, look for the extracted theme folder, and after you have all the new files upload them using FTP to the <strong>/wp-content/themes/<?php 
    echo strtolower($kentooz_theme->Name);
    ?>
/</strong> folder overwriting the old ones (this is why it's important to backup any changes you've made to the theme files).</p>
            <p>If you didn't make any changes to the theme files, you are free to overwrite them with the new ones without the risk of losing theme settings, pages, posts, etc, and backwards compatibility is guaranteed.</p>
        </div>
        
            <div class="clear"></div>
	    
	    <h3 class="title">Changelog</h3>
	    <?php 
    echo $xml->changelog;
    ?>
		
	    <h3 class="title">Latest release themes from kentooz</h3>
	    <?php 
    echo $xml_latestrelease->ktzlatestthemes;
    ?>

	</div>
    
<?php 
}