function update_notifier()
{
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    $theme_data = wp_get_theme(TEMPLATEPATH . '/style.css');
    // Read theme current version from the style.css
    ?>
	
	<style>
		.update-nag { display: none; }
		#instructions {max-width: 670px;}
		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 NOTIFIER_THEME_NAME;
    ?>
 Theme Updates</h2>
	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo NOTIFIER_THEME_NAME;
    ?>
 theme available.</strong> You have version <?php 
    echo $theme_data['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_template_directory_uri() . '/screenshot.png';
    ?>
" />
		
		<div id="instructions">
		    <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 NOTIFIER_THEME_FOLDER_NAME;
    ?>
/</strong></p>
		    <p>To update the Theme, login to <a href="http://www.themeforest.net/?ref=thunderthemes">ThemeForest</a>, head over to your <strong>downloads</strong> section and re-download the theme like you did when you bought 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 NOTIFIER_THEME_FOLDER_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>
	    
	    <h3 class="title">Changelog</h3>
	    <?php 
    echo $xml->changelog;
    ?>

	</div>
    
<?php 
}
function update_notifier_menu()
{
    $xml = get_latest_theme_version(604800);
    // This tells the function to cache the remote call for 604800 seconds (7 days)	$theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); // Get theme data from style.css (current version is what we want)	if(version_compare($theme_data['Version'], $xml->latest) == -1) { 	add_dashboard_page( $theme_data['Name'] . 'Theme Updates ', '&nbsp;<span class="update-plugins count-2"><span class="update-count">New Theme Update</span></span>', 'administrator','m3-updates', update_notifier);	}}  add_action('admin_menu', 'update_notifier_menu');function update_notifier() { 	$xml = get_latest_theme_version(21600); // This tells the function to cache the remote call for 21600 seconds (6 hours)	$theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); // 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>		<style type="text/css">		.changelogcss { font: 400 14px/22px Georgia, serif; color: #333; width:805px;}		.changelogcss h1 { font-family:Georgia, serif;font-size: 26px; font-weight: 400; border-bottom: 1px dotted #ccc; padding: 20px 0 5px 0; color: #333; }		.changelogcss h2 {font-family:Georgia, serif; font-size: 18px; font-weight: 400; border-bottom: 1px dotted #ccc; padding: 20px 0 0px 0; color: #333; }		.changelogcss h2 span {  background: #555555;    color: #FFFFFF !important;    float: right;    font-family: Georgia,serif;    font-size: 12px;    font-weight: bold;    padding: 0 12px;    text-shadow: none; }		.changelogcss strong { font-weight: 400; color: #000; font-style: italic; padding-bottom: 1px; border-bottom: 1px solid #ccc; }		.changelogcss em { color: #000; font-style: normal; padding: 1px 4px 2px; border-bottom: 1px dotted #ccc; background-color: #f1f0cf; text-shadow: 0 1px 0 #fff; cursor: default; }		.changelogcss a { outline: none; color: #53769a; }		.changelogcss .wrapper { width: 650px; margin: 20px auto; }		.changelogcss xmp { background-color: #f4f4f4; border-width: 1px 0; border-style: dotted; border-color: #ccc; padding: 2px 5px; font-size: 12px; text-shadow: 0 1px 0 #fff; }		.changelogcss ol { float: left; width: 100%; margin: 0 0 25px 40px; }		.changelogcss li { padding: 0;  float: left; width: auto; clear: left; margin-bottom: 5px; }  	</style>	<div class="wrap">			<div id="icon-tools" class="icon32"></div>		<h2><?php 
    echo $theme_data['Name'];
    ?>
 Theme Updates</h2>	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo $theme_data['Name'];
    ?>
 theme available.</strong> You have version <?php 
    echo $theme_data['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($theme_data['Name']);
    ?>
/</strong></p>            <p><a href="http://magazine3.com/update-instructions"><b>Read the instructions on How to Update the theme.</b></a></p>        </div>                    <div class="clear"></div>	     	<div class="changelogcss wrapper"> 				<h1>Change Logs</h1>     <?php 
    echo $xml->changelog;
    ?>
</div>	</div>    <?php 
}
示例#3
0
function update_notifier()
{
    $xml = get_latest_theme_version(UDESIGN_NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    ?>
	
	<style>
		.update-nag { display: none; }
		#instructions {max-width: 670px;}
		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 UDESIGN_NOTIFIER_THEME_NAME;
    ?>
 Theme Updates</h2>
	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo UDESIGN_NOTIFIER_THEME_NAME;
    ?>
 theme available.</strong> You have version <?php 
    echo UDESIGN_NOTIFIER_CURR_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">
		    <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 UDESIGN_NOTIFIER_THEME_FOLDER_NAME;
    ?>
/</strong>. I also encourage you to make a full backup your site and database before performing an update.</p>
		    <p>To get the latest update of the Theme, login to <a href="http://www.themeforest.net/">ThemeForest</a>, head over to your <strong>Downloads</strong> section and re-download the theme like you did when you bought it.</p>
		    <p>Extract the contents of the zip file, 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 UDESIGN_NOTIFIER_THEME_FOLDER_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, slider images, etc.</p>
		    <p>Now if you have modified files like CSS or some php files and you haven't kept track of your changes then you can use some 'diff' tools to compare the two versions' files and folders. That way you'd know exactly what files to update and where, line by line. Otherwise you'll loose your customizations.</p>
		    <p><strong>For more detailed instructions please refer to the theme's support forum <a target="_blank" title="How do I update the theme!" href="http://dreamthemedesign.com/u-design-support/discussion/13/how-do-i-update-the-theme/p1">HERE</a>.</strong></p>
		</div>

	    <h3 class="title">Changelog</h3>
	    <?php 
    echo $xml->changelog;
    ?>

	</div>
    
<?php 
}
function update_notifier()
{
    $xml = get_latest_theme_version(21600);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    if (function_exists('wp_get_theme')) {
        $theme_data = wp_get_theme();
        // Get theme data from style.css (current version is what we want)
    } else {
        $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
        // Get theme data from style.css (current version is what we want)
    }
    ?>
	
	<style>
		.update-nag {display: none;}
		#mono_info { float:left; width:400px; margin:0 20px 20px 0; border:1px solid #ccc; -moz-border-radius:5px; -khtml-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; }
		#mono_theme_thumbnail { float:left; display:block; border:1px solid #ccc; }
                #mono_info h3 { margin:0 0 15px 0; font-size:14px; background:#f2f2f2; padding:15px 15px 12px; -moz-border-radius:5px 5px 0 0; -khtml-border-radius:5px 5px 0 0; -webkit-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0; border-bottom:1px solid #ccc; background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee)); background: -moz-linear-gradient(top, #fff, #eee); }
                #mono_info dt { font-weight:bold; margin:0 0 2px 0; font-size:12px; }
                #mono_info dd { margin:0 0 15px 0; font-size:12px; }
                #mono_info dl { margin:0 15px 5px 15px; font-size:12px; }
	</style>

        <div class="wrap">
         <div id="icon-tools" class="icon32"></div>
         <h2><?php 
    echo $theme_data['Name'];
    ?>
 テーマ更新情報</h2>
         <div id="message" class="updated below-h2">
          <p><strong><?php 
    echo $theme_data['Name'];
    ?>
の最新版が公開されています。</strong> 現在利用しているバージョンは「<?php 
    echo $theme_data['Version'];
    ?>
」です。 「<?php 
    echo $xml->latest;
    ?>
」に更新する事ができます。</p>
         </div>
         <div id="mono_instructions">
          <h3>注意事項:最新版にアップデートする際は、必ずテーマの<strong>バックアップ</strong> をしてください。</h3>
          <p style="font-size:16px;">【 <a href="http://wp-dp.com/dl015/grider/grider_tcd015.zip">最新版のテーマをダウンロードする</a> 】</p>
          <div id="mono_info">
	   <h3>更新情報</h3>
	   <?php 
    echo $xml->changelog;
    ?>
          </div>
          <img id="mono_theme_thumbnail" src="<?php 
    echo get_bloginfo('template_url') . '/screenshot.png';
    ?>
" />
         </div>
	</div>
    
<?php 
}
示例#5
0
function update_notifier_message()
{
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    $theme_data = wp_get_theme(NOTIFIER_THEME_FOLDER_NAME);
    if ($xml->latest > $theme_data->get('Version')) {
        ?>

		<div class="error">
		<?php 
        $theme_update_notice = '<p><strong>Your active theme <a href="' . NOTIFIER_THEME_PAGE . '" target="_blank">' . NOTIFIER_THEME_NAME . '</a> by <a href="' . NOTIFIER_AUTHOR_PAGE . '" target="_blank">' . NOTIFIER_AUTHOR_NAME . '</a> is outdated</strong>! You have version v' . $theme_data->get('Version') . ' installed and the latest version is v' . $xml->latest . '. To avoid any security threats and ensure maximum compatibility with your plugins, please <a href="' . NOTIFIER_DOCS_PAGE . '" target="_blank">update now</a>.</p>';
        echo $theme_update_notice;
        ?>
		</div>

	<?php 
    }
}
示例#6
0
function update_notifier_menu()
{
    global $mtcxml;
    $xml = get_latest_theme_version(21600);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    $mtcxml = $xml;
    $theme_data = wp_get_theme();
    if (!is_super_admin() || !is_admin_bar_showing() || !is_admin()) {
        // Don't display notification in admin bar if it's disabled or the current user isn't an administrator
        return;
    }
    //add_dashboard_page( $theme_data->get( 'Name' ) . 'Theme Updates', '', 'administrator', strtolower($theme_data->get( 'Name' )) . '-updates', 'update_notifier');
    if (TRUE == $xml) {
        if (version_compare($theme_data->get('Version'), $xml->latest) == -1) {
            add_dashboard_page($theme_data->get('Name') . 'Theme Updates', $theme_data->get('Name') . '<span class="update-plugins count-1"><span class="update-count">New Updates</span></span>', 'administrator', strtolower($theme_data->get('Name')) . '-updates', 'update_notifier');
            add_action('admin_notices', 'mtc_update_theme_notice');
            add_action('admin_bar_menu', 'mtc_update_notifier_bar_menu', 1000);
        } else {
        }
    }
}
示例#7
0
function update_notifier()
{
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    $theme_data = wp_get_theme();
    // Read theme current version from the style.css
    ?>

	<style>
		.update-nag { display: none; }
		#instructions {max-width: 670px;}
		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 
    _e('Touchfolio Theme Update', 'dsframework');
    ?>
</h2>
	    <div id="message" class="updated below-h2"><p><?php 
    _e('<strong>There is a new version of Touchfolio theme available.</strong> Visit <a style="text-decoration:underline;" href="http://dimsemenov.com/themes/touchfolio/changelog.html">changelog page</a> to see what\'s new and how to update.', 'dsframework');
    ?>
</p></div>
		
		<div id="instructions">
		    <p><?php 
    _e('<strong>Please note:</strong> make a backup of Touchfolio theme inside your WordPress installation folder <strong>', 'dsframework');
    ?>
/wp-content/themes/<?php 
    echo NOTIFIER_THEME_FOLDER_NAME;
    ?>
/</strong> before updating.</p>
		</div>
	</div>
    
<?php 
}
function update_notifier()
{
    $xml = get_latest_theme_version();
    if (isset($xml->latest) ? $latest_ver = $xml->latest : ($latest_ver = false)) {
    }
    if (isset($xml->changelog) ? $changelog = $xml->changelog : ($changelog = false)) {
    }
    $theme_data = wp_get_theme();
    // since WordPress 3.4.0
    $theme_ver = $theme_data->get('Version');
    // Theme Version
    $theme_URI = $theme_data->get('ThemeURI');
    // Theme Demo URL
    $author_name = $theme_data->get('Author');
    // Theme Author Name
    $author_URI = $theme_data->get('AuthorURI');
    // Theme Author Url
    $themeFolder = get_template();
    // Template Folder Name
    add_thickbox();
    // Add Thickbox to open Videos and images
    ?>
	
	<style>
	.ntf_border { border-right: 1px solid #e5e5e5; };
	.ntf_center { margin: 0 auto; text-align: center; }
	.ntf_hide   { display: none; }
	</style>
    
	<div class="wrap">
    	<div id="icon-themes" class="icon32"></div>
		<h2>Updating <?php 
    echo $theme_data;
    ?>
 Theme</h2>
		<table class="wp-list-table widefat" cellspacing="0">
          <thead>
            <tr>
              <th scope="col" class="ntf_border"><strong><?php 
    echo $theme_data;
    ?>
 Screenshot</strong></th>
              <th scope="col" class="ntf_border"><strong>Update Instructions</strong></th>
              <th scope="col" class="ntf_border"><strong>Version <?php 
    echo $latest_ver;
    ?>
 Changelog</strong></th>
            </tr>
          </thead>
		  <tfoot>
		    <tr>
		      <th><?php 
    echo $theme_data;
    ?>
 is Designed by <a href="<?php 
    echo $author_URI;
    ?>
" title="Visit author homepage" target="_blank"><?php 
    echo $author_name;
    ?>
</a></th>
              <th></th>
              <th></th>
            </tr>
		  </tfoot>
          <tbody id="the-list">
          	<tr>
              <td class="ntf_border ntf_center">
                  <a href="<?php 
    echo $theme_URI;
    ?>
" title="Visit <?php 
    echo $theme_data;
    ?>
 site" target="_blank">
                  <img width="400" height="auto" src="<?php 
    echo get_template_directory_uri() . '/screenshot.png';
    ?>
" />
                  </a>
              </td>
              <td class="column-description desc ntf_border">
             	  <h3>Method 1 - ( Automatic - The easy way )</h3>
                  <ol>
                      <li>Install and activate Envato WordPress Toolkit Plugin ( Link to Download: http://goo.gl/NJuVvG )</li>
                      <li><p>Login to your <a href="http://themeforest.net/?ref=<?php 
    echo NOTIFIER_THEMEFOREST_USERNAME;
    ?>
">Themeforest</a> account, go to <strong>Settings -> API Keys</strong>, select and copy your API Key </p></li>
                      <li>Go to <strong>WP Admin -> Envato Toolkit plugin page</strong>, type in your username and paste the API key you copied in the previous step. Click Save Settings.</li>
                  </ol>
                  <p>Once have you filled in your envato marketplace username and  API key, all your purchased themes can be installed and updated on a single click. </p>
              	  <h3>Method 2 - ( Manual - The hard way )</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 $themeFolder;
    ?>
/</strong></p>
                  <ol>
                      <li><p>Login to your <a href="http://themeforest.net/?ref=<?php 
    echo NOTIFIER_THEMEFOREST_USERNAME;
    ?>
">Themeforest</a> account, head over to your <strong>downloads</strong> section and re-download the theme</p></li>
                      <li>Make sure you've backed up your data via Tools > Export</li>
                      <li>Switch Back to the default Theme (Twenty Fourteen) momentarily</li>
                      <li>Delete your current version of "<?php 
    echo $theme_data;
    ?>
". (this is why it's important to backup any changes you've made to the theme files)</li>
                      <li>Install the Theme Via your Wordpress Dashboard. <a href="http://www.youtube.com/embed/q4iO0qxfN5g?feature=oembed&amp;showinfo=0&amp;iv_load_policy=3&amp;modestbranding=0&amp;nologo=1&amp;vq=large&amp;autoplay=1&amp;ps=docs&amp;wmode=opaque&amp;rel=0&amp;TB_iframe=true&width=800&height=500"  title="Theme Install via Wordpress Dashboard" class="thickbox">How to Install your Theme Video</a></li> 
                  </ol>
                  <p>If you didn't make any changes to the theme files, you are free to update withou risk of losing theme settings, pages, posts, and other content.</p>
            </td>
              <td class="column-description desc">
				  <?php 
    echo $changelog;
    ?>
              </td>
         	</tr>
          </tbody>
		</table>
	</div>  
<?php 
}
示例#9
0
function update_notifier()
{
    $xml = get_latest_theme_version(21600);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    $theme_data = 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 $theme_data['Name'];
    ?>
 Theme Updates</h2>
	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo $theme_data['Name'];
    ?>
 theme available.</strong> You have version <?php 
    echo $theme_data['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_template_directory_uri . '/screenshot.png';
    ?>
" />
        
        <div id="instructions" style="max-width: 800px; float:left;">
            <h3 style="margin-top:0">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($theme_data['Name']);
    ?>
/</strong></p>
            <p>To update the Theme:</p>
            <ol>
            	<li>Login to your Themeforest account, head over to your <strong>downloads</strong> section and re-download the theme</li>
            	<li>Make sure you've backed up your data via Tools > Export</li>
            	<li>Switch Back to the default Theme (Twenty Twelve) momentarily</li>
            	<li>Delete your current version of "<?php 
    echo $theme_data['Name'];
    ?>
". (this is why it's important to backup any changes you've made to the theme files)</li>
            	<li>Install the Theme Via your Wordpress Dashboard. <a href="http://themewich.com/how-to-install-your-theme/" target="_blank">How to Install your Theme Video</a></li> 
            </ol>
            <p>If you didn't make any changes to the theme files, you are free to update withou risk of losing theme settings, pages, posts, and other content.</p>
        </div>
        
            <div class="clear"></div>
	    
	    <h3 class="title">Changelog</h3>
	    <?php 
    echo $xml->changelog;
    ?>

	</div>
    
<?php 
}
function update_notifier()
{
    $xml = get_latest_theme_version(21600);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    $theme_data = wp_get_theme('kingsize');
    // Get theme data from style.css (current version is what we want) wp_get_theme
    ?>
	
	<style>
		.update-nag {display: none;}
		#instructions {max-width: 800px;}
	</style>

	<div class="wrap">
	
		<div id="icon-tools" class="icon32"></div>
		<h2><?php 
    echo $theme_data['Name'];
    ?>
 Theme Updates</h2>
	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo $theme_data['Name'];
    ?>
 theme available.</strong> You have version <?php 
    echo $theme_data['Version'];
    ?>
 installed. Please 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 Instructions</h3>
            
            <p>To get the updated version of the theme go to your <a href="http://themeforest.net?ref=OurWebMedia" target="_blank">ThemeForest</a> downloads page and redownload the theme.</p>
		
			<p>1. Read over the <a href="http://www.kingsizetheme.com/tag/change-log/" target="blank">Change Logs</a>.</p>
		
			<p>2. <strong style="color: red;">BACKUP YOUR WEBSITE</strong>!</p>
			
			<p>3. Go to <a href="http://themeforest.net/" target="blank">Theme Forest</a> and log into your account. Head to the "Downloads" section and locate the "KingSize WordPress" theme. Re-download this to your computer and extract it.</p>
			
			<p>4. Once extracted, inside locate the "<strong>Template Files</strong>" folder. In here you will find the zipped template named "<i>kingsize.zip</i>". Upload to your server where WordPress is installed, into the "<strong>../wp-content/themes</strong>" directory.</p>
			
			<p>5. Now you'll need to go to your hosting environments Control Panel > File Manager and extract the zipped folder you've uploaded (your hosting provider should offer a method to extract compressed folders with the file manager). Alternatively, you may also upload this already unzipped but the upload time will vary and will likely result in a longer upload process.</p>
			
			<p>6. Now decompress / extract the zipped files to overwrite the original "kingsize" theme folder.</p>
			
			<p>7. <strong style="color: red;">IMPORTANT</strong>: Head to your WordPress installation dashboard and go to "<strong>Appearance > Themes</strong>". Make sure it's stating the latest version is <strong><?php 
    echo $xml->latest;
    ?>
</strong>. Now in order to apply the new features and updates, <strong>DE-ACTIVATE</strong> the template by enabling another and then <strong>RE-ACTIVATE</strong> the template again. This should be done after all updates to ensure those features are carried over properly.</p>
			
			<p>8. Go to "<strong>Appearance > KingSize Options</strong>" and be sure to "<strong>SAVE ALL CHANGES</strong>". This ensures the new options/features are set.</p>
			
			<p>For further information we always recommend you read the Template Documentation. This can be found inside the folder you downloaded and extracted from Theme Forest. Locate the folder named "<strong>Documentation</strong>" and inside it the "<i>Help.html</i>" file. For tutorials and demonstrations, please checkout the website: <a href="http://www.kingsizetheme.com" target="blank">http://www.kingsizetheme.com</a></p>
			
			<p>For buyer / customer Support Forums, please visit: <a href="http://www.denoizzed.com/forum" target="blank">http://www.denoizzed.com/forum</a> and if you're having difficulties joining the Support Forums, please <a href="http://denoizzed.com/how-to-register/" target="blank">read and/or watch the help documentation/video</a>. We're here to help, so do not hesitate to contact us!</p>
			
			<p>In your humble service,<br />
			Bryce Wisekal &amp; Kumar Sekhar / <a href="http://www.ourwebmedia.com" target="blank">OurWebMedia</a>, <i>WordPress Developers</i><br />
			Nick Shylo / <a href="http://www.denoizzed.com" target="blank">Denoizzed</a>, <i>HTML / Design Author</i></p>
			
			<p></p>

			<p><?php 
    echo $xml->info;
    ?>
</p>
			
        </div>
        
        <div class="clear"></div>

	</div>
    
<?php 
}
示例#11
0
function update_notifier()
{
    $xml = get_latest_theme_version(21600);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    // 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 $theme_data['Name'];
    ?>
 Theme Updates</h2>
	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo $theme_data['Name'];
    ?>
 theme available.</strong> You have version <?php 
    echo $theme_data['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($theme_data['Name']);
    ?>
/</strong></p>
            <p>To update the Theme, login to <a href="http://www.themeforest.net/">ThemeForest</a>, head over to your <strong>downloads</strong> section and re-download the theme like you did when you bought 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($theme_data['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;
    ?>

	</div>
    
<?php 
}
示例#12
0
/**
 * Notifier page renderer
 */
function update_notifier()
{
    // Requirements check
    if (!is_super_admin()) {
        return;
    }
    // Helper variables
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    // Processing
    /**
     * No need for translations, english only.
     */
    ?>

			<div class="wrap update-notifier">

				<h2><strong><?php 
    echo WM_THEME_NAME;
    ?>
</strong> Theme Updates</h2>

				<br />

				<div class="message error">

					<p><?php 
    if (isset($xml->message) && trim($xml->message)) {
        echo '<strong>' . trim($xml->message) . '</strong><br />';
    }
    echo 'You have version ' . WM_THEME_VERSION . ' installed. <strong>Update to version ' . trim($xml->latest) . ' now.</strong>';
    ?>
</p>

				</div>

				<div class="instructions">

					<?php 
    if (isset($xml->instructions) && trim($xml->instructions)) {
        echo trim($xml->instructions);
    } else {
        ?>

						<img src="<?php 
        echo esc_url(wp_get_theme('mustang')->get_screenshot());
        ?>
" alt="" class="theme-img" />

						<h3>Update Download and Instructions</h3>

						<p>First, please, re-download the new theme update from the source where you've originally obtained the theme.</p>

						<p>Use one of these options to update your theme:</p>

						<?php 
        if (isset($xml->important)) {
            echo '<div class="important-note">' . $xml->important . '</div>';
        }
        ?>

						<ul>

							<?php 
        if (class_exists('Envato_WP_Toolkit') && !isset($xml->noenvato)) {
            echo '<li><h4>Automatic theme update:</h4><a href="' . network_admin_url('admin.php?page=envato-wordpress-toolkit') . '" class="button button-primary button-hero">Update the Theme Automatically &raquo;</a></li>';
        }
        ?>

							<li>

								<h4>Preferred, safer, quicker procedure:</h4>

								<ol>
									<li>Upload the theme installation ZIP file using FTP client to your server (into <code>YOUR_WORDPRESS_INSTALLATION/wp-content/themes/</code>).</li>
									<li>Using your FTP client, rename the old theme folder (for example from <code>my-theme</code> to <code>my-theme-bak</code>).</li>
									<li>When the old theme folder is renamed, unzip the theme installation zip file directly on the server (you might need to use a web-based FTP tool for this - hosting companies provides such tools).</li>
									<li>After checking whether the theme works fine, delete the renamed old theme folder from the server (the <code>my-theme-bak</code> folder in our case).</li>
								</ol>

							</li>

							<li>

								<h4>Easier, slower procedure:</h4>

								<ol>
									<li>Unzip the zipped theme file (you have just downloaded) on your computer.</li>
									<li>Upload the unzipped theme folder using FTP client to your server (into <code>YOUR_WORDPRESS_INSTALLATION/wp-content/themes/</code>) overwriting all the current theme files. Please note that if some files were removed from the theme in the new update, you will have to delete these files additionally from your server. For removed files please check the changelog on the right.</li>
								</ol>

							</li>

						</ul>


					<?php 
    }
    // /Custom instructions check
    ?>

				</div>

				<div class="changelog note">

					<h2>Changelog</h2>

					<?php 
    if (isset($xml->changelog)) {
        echo $xml->changelog;
    }
    ?>

					<hr />

					<h3>Files changed:</h3>

					<code><?php 
    if (isset($xml->changefiles)) {
        echo str_replace(', ', '</code><br /><code>', $xml->changefiles);
    }
    ?>
</code>

				</div>

			</div>

			<?php 
}
示例#13
0
    function update_notifier()
    {
        if (ini_get('allow_url_fopen')) {
            $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
            // Get the latest remote XML file on our server
            // get the current theme version
            if (function_exists('wp_get_theme')) {
                $theme_data = wp_get_theme();
                $version = $theme_data->Version;
            } else {
                $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
                // Read theme current version from the style.css
                $version = $theme_data['Version'];
            }
            ?>
			<style>
				.update-nag { display: none; }
				#instructions {max-width: 670px;}
				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 NOTIFIER_THEME_NAME;
            ?>
 Theme Updates</h2>

				<?php 
            // Check if new version exists
            if (version_compare($xml->latest, $version, '>')) {
                ?>
				<br />
				<div id="message" class="error below-h2"><p><strong>There is a new version of the <?php 
                echo NOTIFIER_THEME_NAME;
                ?>
 theme available.</strong> You have version <?php 
                echo $version;
                ?>
 installed. <strong>Please update to version <?php 
                echo $xml->latest;
                ?>
.</strong></p></div>
				<br />
				<?php 
            } else {
                // No new version available
                ?>
				<br />
				<div id="message" class="updated below-h2"><p><strong>Your theme is up to date.</strong> The latest version <?php 
                echo $version;
                ?>
 of <?php 
                echo NOTIFIER_THEME_NAME;
                ?>
 theme is installed.</strong></p></div>
				<br />
				<?php 
            }
            ?>
				<img style="float: left; margin: 0 20px 20px 0; border: 1px solid #ddd;" src="<?php 
            echo get_template_directory_uri() . '/screenshot.png';
            ?>
" width="320" />

				<div id="instructions">

	  			<h3>Update Download and Instructions</h3>
	  			<p>To update the theme you have to download the theme from your "Downloads" section on ThemeForest. Log into your account and download either the "All files & documentation" or only the "Installable WordPress file" package.</p>
	  			<p><strong>Please note:</strong> before updating the theme make a <strong>backup</strong> of the theme files inside your WordPress installation folder <strong>/wp-content/themes/<?php 
            echo NOTIFIER_THEME_FOLDER_NAME;
            ?>
/</strong></p>
	        <p>&nbsp;</p>
	  			<h4>You can now update the theme files in two ways:</h4>
	  			<ol>
	  				<li>
	  				  <p><strong>FTP Upload:</strong> Using your FTP program, upload the non-zipped theme folder (/invictus_x.x.x) from within the "All files & documentation" download package into the /wpcontent/themes/ folder on your server.</p>
	  				  <p>If you didn't make any changes to the theme files, you are free to overwrite the old theme files with the new ones without the risk of losing theme settings, pages, posts, etc. Backward compatibility is guaranteed.</p>
	          </li>
	  				<li>
	  				  <p><strong>WordPress Upload:</strong> Navigate to <em>Appearance > Add New Themes > Upload</em> and go to browse. Select the zipped theme file from the "Installable WordPress file" download. Click on the <em>Install Now</em> button and the theme will be uploaded and installed as a new theme.</p>
	            <p>Once the theme is installed, you need to activate it. Go to Appearance > Themes and activate your chosen theme.</p>
	            <p>
	              You will not loose any post, settings or options when you install the new theme version beside the old version. When you switch to the new version, all your posts, settings and options are used by the new version.
	            </p>
	  				</li>
	  			</ol>
	        <p>&nbsp;</p>
	        <p>Further reading on theme installations at the <a href="http://codex.wordpress.org/Using_Themes">WordPress Codex</a> - <a href="http://codex.wordpress.org/Using_Themes">http://codex.wordpress.org/Using_Themes</a></p>
				</div>

				<h3 class="title">Changelog</h3>
				<?php 
            echo $xml->changelog;
            ?>

			</div>

	<?php 
        } else {
            ?>

			<div class="wrap">

				<div id="icon-tools" class="icon32"></div>
				<h2><?php 
            echo NOTIFIER_THEME_NAME;
            ?>
 Theme Updates</h2>

				<p><strong>Your server does not support this functionalty.</strong> Please contact your server admnistrator to enable the option "allow_url_fopen" in your php.ini.</p>

			</div>

		<?php 
        }
    }
function update_notifier()
{
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    $theme_data = wp_get_theme();
    // Read theme current version from the style.css
    ?>
	
	<style>
		.update-nag { display: none; }
		#instructions {max-width: 670px;}
		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 NOTIFIER_THEME_NAME;
    ?>
 Information</h2>
		<!--<div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo NOTIFIER_THEME_NAME;
    ?>
 available.</strong> You have version <?php 
    echo $theme_data['Version'];
    ?>
 installed. Update to version <?php 
    echo $xml->latest;
    ?>
.</p></div>-->

		<div id="instructions">

			<img style="float: left; margin: 0 20px 20px 0; border: 1px solid #ddd;" src="<?php 
    echo get_bloginfo('template_url') . '/screenshot.png';
    ?>
" />
			<h3>Theme Information</h3>
			<p>Please see the changelog below for information about the theme.</p>

			<?php 
    if ((double) $xml->latest > (double) $theme_data['Version']) {
        ?>
			<h3>Update Information</h3>
			<p><strong>There is a new version of the <?php 
        echo NOTIFIER_THEME_NAME;
        ?>
 available.</strong></p>
			<p>You have version <?php 
        echo $theme_data['Version'];
        ?>
 installed. Update to version <strong><?php 
        echo $xml->latest;
        ?>
</strong>.</p>
			<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 NOTIFIER_THEME_FOLDER_NAME;
        ?>
/</strong></p>
			<p>To download the updated <?php 
        echo NOTIFIER_THEME_NAME;
        ?>
, please visit the <a href="http://webservices.it.ufl.edu">UF Web Services</a> site.</p>

			<ol>
				<li>Extract the zip's contents.</li>
				<li>Upload the files to a new folder in <strong>/wp-content/themes/</strong>.</li>
				<li>Update any files that you have customized.</li>
				<li>Log in to WordPress and switch to the new theme.</li>
				<li>Check that your site is functioning correctly.</li>
				<li>Archive and remove the old theme folder.</li>
			</ol>

			<p>If you have edited any files please ensure that your changes are not being overwritten.</p>
			<?php 
    }
    ?>
			<div class="clear"></div>
		</div>
		
		<h3 class="title">Changelog</h3>
		<?php 
    echo $xml->changelog;
    ?>

	</div>
	
<?php 
}
示例#15
0
function update_notifier()
{
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    $theme_data = get_theme_data(TEMPLATEPATH . '/style.css');
    // Read theme current version from the style.css
    ?>
	
	<style>
		.update-nag { display: none; }
		#instructions {max-width: 670px;}
		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 NOTIFIER_THEME_NAME;
    ?>
主题更新提醒</h2>
	    <div id="message" class="updated below-h2"><p>您正在使用的<strong><?php 
    echo NOTIFIER_THEME_NAME;
    ?>
</strong>主题有更新!您正在使用的版本是 <?php 
    echo $theme_data['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">
		    <h3>主题更新提示与注意事项:</h3>
		    <p>本页面意在告诉您正在使用的<?php 
    echo NOTIFIER_THEME_NAME;
    ?>
主题有了更新版本,为保证主题使用质量,请准备下载更新升级本主题。</p>
		    <p><?php 
    echo NOTIFIER_THEME_NAME;
    ?>
主题简介:<a target="_blank" href="http://devework.com/bevework.html">http://devework.com/bevework.html</a></p>
		    <p>最新版主题包下载地址请前往DW商城登录“我的账户”页面获取,如果你之前是在第三方获取的,为了保证是官方原版,建议注册个账户(本主题购买是免费的):</p>
		    <p><a target="_blank" href="http://store.devework.com/product/bevework">DW商城Bevework主题主页</a>&nbsp;&nbsp;<a target="_blank" href="http://store.devework.com/">其他优秀收费主题</a></p>
		    <p>在下载最新主题包前,建议您事先<strong>备份</strong>一下网站数据。虽然更新主题一般来说是很安全的,但数据无价,为了以防万一,有备无患。</p>
		    <p>感谢您的支持,如有打扰,还望见谅!</p>
		    
		</div>
	    
	    <h3 class="title">更新历史</h3>
	    <?php 
    echo $xml->changelog;
    ?>

	</div>
    
<?php 
}
示例#16
0
	function update_notifier() {
		$xml = get_latest_theme_version( NOTIFIER_CACHE_INTERVAL ); // Get the latest remote XML file on our server
		?>
		<div class="wrap update-notifier">

			<div id="icon-tools" class="icon32"></div>
			<h2><?php printf( __( '<strong>%s</strong> Theme Updates', 'lespaul_domain_adm' ), WM_THEME_NAME ); ?></h2>

			<br />

			<div id="message" class="updated below-h2">
				<p>
				<strong><?php echo $xml->message; ?></strong><br />
				<?php printf( __( 'You have version %1$s installed. Update to version %2$s.', 'lespaul_domain_adm' ), WM_THEME_VERSION, trim( $xml->latest ) ); ?>
				</p>
			</div>

			<div id="instructions">
				<img src="<?php echo get_stylesheet_directory_uri(); ?>/screenshot.png" alt="" class="theme-img" />

				<h3><?php _e( 'Update Download and Instructions', 'lespaul_domain_adm' ); ?></h3>

				<p><?php _e( 'To update the theme, login to <a href="http://www.themeforest.net/" target="_blank">ThemeForest</a>, head over to <strong>downloads section</strong> and re-download the theme like you did when you bought it. Feel free to leave any feedback and rating :)', 'lespaul_domain_adm' ); ?></p>

				<p><?php _e( 'To install the new updated theme unzipp the zipped theme package file obtained from ThemeForest on your computer. Open the theme package folder and head over to <code>install</code> subfolder where you will find a theme installation ZIP file.', 'lespaul_domain_adm' ); ?></p>

				<p><?php _e( 'Now use one of these options to update the theme:', 'lespaul_domain_adm' ); ?></p>

				<ol>
					<li>
						<strong><?php _e( 'Easier, but might take longer time', 'lespaul_domain_adm' ); ?></strong><br />
						<?php _e( 'Unzip the theme installation ZIP file on your computer. Upload the unzipped theme folder using FTP client to your server (into <code>YOUR_WORDPRESS_INSTALLATION/wp-content/themes/</code>) overwriting all the current theme files.', 'lespaul_domain_adm' ); ?>

						<p class="note"><?php _e( "<strong>Note:</strong> <em>If you didn't make any changes to the theme files, you are free to overwrite files with the new ones without the risk of loosing theme settings, pages, posts, etc, and backwards compatibility is guaranteed. In case you have made changes to the theme files, make sure you have a backup copy of your changes before you overwrite theme files.</em>", 'lespaul_domain_adm' ); ?></p>
					</li>
					<li>
						<strong><?php _e( 'More advanced', 'lespaul_domain_adm' ); ?></strong><br />
						<?php printf( __( 'Upload the theme installation ZIP file using FTP client to your server (into <code>YOUR_WORDPRESS_INSTALLATION/wp-content/themes/</code>). Using your FTP client, rename the old theme folder (for example from %1s to %2s). When the old theme folder is renamed, unzip the theme installation zip file on the server. After checking if the theme works fine, delete the renamed old theme folder from server (or keep it as a backup, but it will take space on your server unnecessarily...).', 'lespaul_domain_adm' ), '<code>' . WM_THEME_SHORTNAME . '</code>', '<code>' . WM_THEME_SHORTNAME . '-old</code>' ); ?>
					</li>
				</ol>
			</div>

			<div id="changelog" class="note">
				<div class="icon32 icon32-posts-page" id="icon-edit-pages"><br /></div><h2><?php _e( 'Update Changes', 'lespaul_domain_adm' ); ?></h2>
				<?php echo $xml->changelog; ?>
				<hr />
				<h3><?php _e( 'Files changed:', 'lespaul_domain_adm' ); ?></h3>
				<code><?php echo str_replace( ', ', '</code><br /><code>', $xml->changefiles ); ?></code>
			</div>
		</div>
		<?php
	} // /update_notifier
    function update_notifier()
    {
        if (function_exists('wp_get_theme')) {
            $xml = get_latest_theme_version(MTHEME_NOTIFIER_CACHE_INTERVAL);
            // Get the latest remote XML file on our server
            $theme_data = wp_get_theme();
            // Read theme current version from the style.css
        }
        ?>
	<style>
		.update-nag { display: none; }
		#instructions {max-width: 670px;}
		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 MTHEME_NOTIFIER_THEME_NAME;
        ?>
 Theme Updates</h2>
	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
        echo MTHEME_NOTIFIER_THEME_NAME;
        ?>
 theme available.</strong> You have version <?php 
        echo $theme_data['Version'];
        ?>
 installed. Update to version <?php 
        echo $xml->latest;
        ?>
.</p></div>

		<img style="margin: 0 20px 20px 0; border: 1px solid #ddd;" src="<?php 
        echo get_stylesheet_directory_uri() . '/screenshot.png';
        ?>
" />
		
		<div id="instructions">
		    <h2>Update Download and Instructions</h2>
		    <p><strong>Please note:</strong> make a <strong>backup</strong> of the Theme inside your WordPress installation folder <code>/wp-content/themes/<?php 
        echo MTHEME_NOTIFIER_THEME_FOLDER_NAME;
        ?>
/</code></p>
		    <p><h3>DOWNLOAD</h3> Get the latest update of the Theme, login to <a href="http://www.themeforest.net/">ThemeForest</a>, head over to your <strong>Downloads</strong> section and re-download the theme.</p>
		    <p><h3>EXTRACT</h3> Extract the contents of the zip file, look for the extracted theme folder.</p>
			<p><h3>UPDATE</h3> Upload the new files using FTP to the <code>/wp-content/themes/<?php 
        echo MTHEME_NOTIFIER_THEME_FOLDER_NAME;
        ?>
/</code> folder overwriting the old ones .</p>
		    <div class="updated below-h2">
			<h4>Important Note:</h4> If you didn't make any changes to the theme files, you can overwrite all files with the new ones without the risk of losing theme settings, pages, posts, slider images, etc.
		    <p>If you have modified files like CSS or PHP files and haven't kept track of your changes, then you can use a 'diff' tools to compare the two versions' files and folders. That way you'd know exactly what files to update and where, line by line. Otherwise you'll loose your customizations.</p>
			</div>
		</div>
		<p>
	    <h2 class="title">Changelog</h2>
	    <?php 
        echo nl2br($xml->changelog);
        ?>
		</p>
	</div>
    
<?php 
    }
function update_notifier()
{
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    $theme_data = wp_get_theme();
    ?>
	<style>
		.update-nag { display: none; }
		#theme_update_instructions {max-width: 670px;}
		.theme_update_changelog_title {margin: 30px 0 0 0; padding: 30px 0 0 0; border-top: 1px solid #ddd;}
		.theme_update_changelog ul { list-style-type:disc; margin-left:20px;}
	</style>

	<div class="wrap">
	
		<div id="icon-tools" class="icon32"></div>
		<h2><?php 
    echo NOTIFIER_THEME_NAME;
    ?>
 <?php 
    _e('Theme Updates', 'themerex');
    ?>
</h2>
	    <div id="message" class="updated below-h2"><p><strong><?php 
    echo sprintf(__('There is a new version of the %s theme available.', 'themerex'), NOTIFIER_THEME_NAME);
    ?>
</strong> <?php 
    echo sprintf(__('You have version %s installed. Update to version %s.', 'themerex'), $theme_data->get('Version'), $xml->latest);
    ?>
</p></div>

		<div><img alt="" style="margin: 0 0 20px 0; border: 1px solid #ddd;" src="<?php 
    echo themerex_get_file_url('/screenshot.png');
    ?>
" /></div>
		
		<div id="theme_update_instructions">
		    <h3><?php 
    _e('Update Download and Instructions', 'themerex');
    ?>
</h3>
		    <p><?php 
    echo sprintf(__('<strong>Please note:</strong> make a backup of the Theme inside your WordPress installation folder <strong>/wp-content/themes/%s/</strong>', 'themerex'), NOTIFIER_THEME_FOLDER_NAME);
    ?>
</p>
		    <p><?php 
    _e('To update the Theme, login to <a href="' . esc_url('http://www.themeforest.net/') . '">ThemeForest</a>, head over to your <strong>downloads</strong> section and re-download the theme like you did when you bought it.', 'themerex');
    ?>
</p>
		    <p><?php 
    echo sprintf(__("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/%s/</strong> folder overwriting the old ones (this is why it's important to backup any changes you've made to the theme files).", 'themerex'), NOTIFIER_THEME_FOLDER_NAME);
    ?>
</p>
		    <p><?php 
    _e("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.", 'themerex');
    ?>
</p>
		</div>
	    
	    <h3 class="theme_update_changelog_title"><?php 
    _e('Changelog', 'themerex');
    ?>
</h3>
	    <div class="theme_update_changelog"><?php 
    echo esc_html($xml->changelog);
    ?>
</div>

	</div>
    
<?php 
}
示例#19
0
function update_notifier()
{
    global $wpGrade_Options;
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    $theme_data = wp_get_theme();
    // Read theme current version from the style.css
    $options_url = admin_url('index.php?page=' . WPGRADE_UPDATE_PAGE_NAME . '&wpGrade_update=true');
    ?>

	<script type="text/javascript">
	var wpGradeUpdateData = {
		optionsLink: "<?php 
    echo $options_url;
    ?>
",
		envatoDetails: <?php 
    if ($wpGrade_Options->get('marketplace_username') && $wpGrade_Options->get('marketplace_api_key')) {
        echo "true";
    } else {
        echo "false";
    }
    ?>
	};
	</script>

	<div class="wrap">

	<div id="icon-tools" class="icon32"></div>
	<h2><?php 
    echo NOTIFIER_THEME_NAME;
    ?>
 Theme Updates</h2>

	<?php 
    if (!(isset($_GET['wpGrade_update']) && $_GET['wpGrade_update'] == 'true')) {
        ?>
	<div id="message" class="updated below-h2"><p><strong><?php 
        echo $xml->message;
        ?>
</strong> You have version <?php 
        echo $theme_data->Version;
        ?>
 installed. Please update to version <?php 
        echo $xml->latest;
        ?>
.</p></div>


	<div id="instructions">
	<div class="two-columns">
		<h3>Automatic Update Instructions</h3>
		<b>Important: </b><i>Please note that with the automatic theme update <b>any code modifications</b> done in the theme's code <b>will be lost</b>, so please
				 make sure you have a <b>backup copy of the theme files</b> before you update the theme. </i>
		<p>In order to use this functionality, you have to:<br/>
		1. Go to <strong><?php 
        echo NOTIFIER_THEME_NAME;
        ?>
 Options &raquo; Theme Auto Update</strong> section and input your <b>ThemeForest/Envato Marketplace username</b> and <b>API Key</b> in the corresponding fields. <br/>
		2. Make sure that the <b>name of the folder</b> that contains the theme files is called <b>"<?php 
        echo NOTIFIER_THEME_SHORTNAME;
        ?>
"</b>. This is the default folder name, so if you haven't modified it manually, the name of the folder on your server should be called "<?php 
        echo NOTIFIER_THEME_SHORTNAME;
        ?>
"</p>

		<div id="confirm-update" title="Theme Update">Are you sure you want to update the theme and replace all your current theme files with the new updated files?</div>
		<div id="no-details" title="Almost There">You haven't inserted your Marketplace username and API Key - please go to the <a href="<?php 
        echo admin_url() . 'admin.php?page=' . NOTIFIER_THEME_SHORTNAME . '_options';
        ?>
"><b><?php 
        echo NOTIFIER_THEME_NAME;
        ?>
 Options</b></a> page and input the required data in the <b>"Theme Auto Update"</b> section.</div>
		<a href="" class="button-primary" id="update-btn">Automatically Update Theme</a>
	</div>

	<div class="two-columns no-margin">
		<h3>Manual Update Instructions</h3>
		<p><b>It is recommended to manually install the update if you have done some modifications to the theme's code.</b> If so, first create
			a backup copy of the current theme you have installed and modified and then you can proceed with installing the update.</p>
		<a id="manual-instructions-btn" class="button-primary">View Update Instructions</a>
		<div id="manual-instructions" title="Manual Update Instructions">
		<p>To download the latest update of the theme, login to <a href="http://www.themeforest.net/">ThemeForest</a>, head over to your <strong>Downloads</strong> section in your profile and download again the theme like you did when you bought it.</p>
		<p>There are two main ways of installing an update manually:</p>
		<ol>
		<li><i><b>By uploading the theme as a new theme (recommended)</b></i>- this is the easiest way to accomplish this. You just have to upload
		the updated theme zip file via the built in WordPress theme uploader as a new theme from the Appearance &raquo; Themes &raquo; Install Themes &raquo; Upload section.

		<div class="note_box">
			<b>Note: </b><i>Please note that when activating the new theme it is possible that your menu settings are not kept for the new theme. If so, you just have to go to Appearance &raquo; Menus &raquo; Theme Locations, select the menu (it is still there) and press the "Save" button</i>.
		</div>
		</li>
		<li><i><b>Via FTP</b></i> - you have to first unzip the zipped theme file and then you can use an FTP client (such as <a href="http://filezilla-project.org/download.php">FileZilla</a>) and replace all the theme files with the updated ones.

		<div class="note_box">
			<b>Note: </b><i>Please note that with the file replacing all the code changes you have made to the files (if you have made any) will be lost, so please make sure you have a backup copy of the theme files before you do the replacement. All the settings you have made from the Admin panel (Theme Options and other places) won't be lost- they will still be available.</i>
		</div>

		</li>
		</ol>
		</div>
	</div>
	<div class="clear"></div>
	<p>For more information about auto updates, please refer to the "Updates" section of the documentation included.</p>
	<br />
	</div>
	<?php 
    }
    ?>
	<div class="icon32 icon32-posts-page" id="icon-edit-pages"><br></div><h2 class="title" id="changes-title">Update Changes</h2>
		<div id="changelog">
	<?php 
    echo $xml->changelog;
    ?>
	</div>
	</div>
<?php 
}
示例#20
0
/**
 * Notifier page renderer
 */
function update_notifier()
{
    //Requirements check
    if (!is_super_admin()) {
        return;
    }
    $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    ?>
		<div class="wrap update-notifier">

			<div id="icon-tools" class="icon32"></div>
			<h2><strong><?php 
    echo WM_THEME_NAME;
    ?>
</strong> Theme Updates</h2>

			<br />

			<div id="message" class="error">
				<p>
				<?php 
    if (isset($xml->message) && trim($xml->message)) {
        echo '<strong>' . trim($xml->message) . '</strong><br />';
    }
    echo 'You have version ' . WM_THEME_VERSION . ' installed. <strong>Update to version ' . trim($xml->latest) . ' now.</strong>';
    ?>
				</p>
			</div>

			<div id="instructions">
				<img src="<?php 
    echo get_template_directory_uri();
    ?>
/screenshot.png" alt="" class="theme-img" />

				<h3>Update Download and Instructions</h3>

				<p>To update the theme you need to <strong>re-download it from the marketplace</strong> you have bought it on.</p>

				<p>Use one of these options to update the theme:</p>

				<?php 
    if (isset($xml->important)) {
        echo '<div class="important-note">' . $xml->important . '</div>';
    }
    ?>

				<ul>
					<?php 
    if (class_exists('Envato_WP_Toolkit') && !isset($xml->noenvato)) {
        echo '<li><h4>Automatic theme update:</h4><a href="' . network_admin_url('admin.php?page=envato-wordpress-toolkit') . '" class="button button-primary button-hero">Update the Theme Automatically &raquo;</a></li>';
    }
    ?>
					<li>
						<h4>Easier, but might take longer time:</h4>
						<ol>
							<li>Unzip the zipped theme file (you have just downloaded) on your computer.</li>
							<li>Upload the unzipped theme folder using FTP client to your server (into <code>YOUR_WORDPRESS_INSTALLATION/wp-content/themes/</code>) overwriting all the current theme files.</li>
						</ol>
					</li>
					<li>
						<h4>More advanced, quicker:</h4>
						<ol>
							<li>Upload the theme installation ZIP file using FTP client to your server (into <code>YOUR_WORDPRESS_INSTALLATION/wp-content/themes/</code>).</li>
							<li>Using your FTP client, rename the old theme folder (for example from <code><?php 
    echo WM_THEME_SHORTNAME;
    ?>
</code> to <code><?php 
    echo WM_THEME_SHORTNAME;
    ?>
-old</code>).</li>
							<li>When the old theme folder is renamed, unzip the theme installation zip file directly on the server (you might need to use a web-based FTP tool for this; hosting companies provides such tools).</li>
							<li>After checking whether the theme works fine, delete the renamed old theme folder from the server.</li>
						</ol>
					</li>
				</ul>
			</div>

			<div id="changelog" class="note">
				<div class="icon32 icon32-posts-page" id="icon-edit-pages"><br /></div><h2>Changelog</h2>
				<?php 
    echo $xml->changelog;
    ?>
				<hr />
				<h3>Files changed:</h3>
				<code><?php 
    echo str_replace(', ', '</code><br /><code>', $xml->changefiles);
    ?>
</code>
			</div>
		</div>
		<?php 
}
示例#21
0
function update_notifier_menu() {  
	$xml = get_latest_theme_version(21600); // This tells the function to cache the remote call for 21600 seconds (6 hours)
	$theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); // Get theme data from style.css (current version is what we want)
	
	if(version_compare($theme_data['Version'], $xml->latest) == -1) {
		global $theme_update_notice, $pagenow;
		if ( $pagenow == "index.php") { ?>
		
		<?php $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); ?>
				
				<div id="message" class="updated fade" style="width: 97%;">
					<p>A new version of <?php echo $theme_data['Title']; ?> theme is available for download. To update the Theme, login to <a target="_blank" href="http://www.themeforest.net/">ThemeForest</a>, head over to your <strong>downloads</strong> section and re-download the theme like you did when you bought it.</p>
				</div>
				
				<div id="message" class="updated metabox-holder" style="background: none; border:none; width:98%;">
					
					<div class="postbox-container-new">
						
						<div id="dashboard_right_now" class="postbox " style="background: #fffddf;">
						<div class="handlediv" title="Click to toggle"><br></div><h3 class="hndle"><span><?php echo $theme_data['Title'];?> Theme Update Available</span></h3>
							<div class="inside">
							
								<div id="notice">
									
									
									<div class="table table_content">
										<p class="sub">Update Instruction And Information</p>
										<p>Hello <strong><?php global $current_user; get_currentuserinfo(); echo $current_user->user_login . "\n"; ?></strong>, a new version of <?php echo $theme_data['Title']; ?> theme is available for download.  </p>
										
										<p>You are running <?php echo '<strong>'.$theme_data['Title'] . '</strong> <strong style="color:red;">' . $theme_data['Version'] .'</strong>';?>, the latest available theme version is <strong style="color:green;"><?php echo $xml->latest; ?></strong> . <p>To update the Theme, login to <a href="http://www.themeforest.net/">ThemeForest</a>, head over to your <strong>downloads</strong> section and re-download the theme like you did when you bought 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/express_store</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></p>
									
									</div>
									
									<div class="table table_discussion">
										<p class="sub"><?php echo $theme_data['Title'];?> Theme Updates Changelog</p>
										
											<p>Take a look at changes made to <?php echo $theme_data['Title']; ?></p> 
												
												<p><a href="#" onClick="jQuery(this).parent().parent().parent().find('.fullchange').slideToggle();">View Full Changelog</a></p>
												
												<div class="fullchange">
													<p><?php echo $xml->changelog; ?></p>
												</div>
											
										</div>
										
										<br class="clear">
									
								</div>
								
								
								
							</div>
						</div>
						
					</div>
					
					
					
				</div>
		<?php }
		 
		 if ( $pagenow !== "index.php") { ?>
		 
		 	<div id="message" class="updated fade" style="width: 97%; line-height:1.6em;">
		 		<p style="font-size:11px !important;">A new version of <?php echo $theme_data['Title']; ?> theme is available for download. To update the Theme, login to <a target="_blank" href="http://www.themeforest.net/">ThemeForest</a>, head over to your <strong>downloads</strong> section and re-download the theme like you did when you bought it, please for more detailed instructions and update informations take a look at your <a href="<?php echo  get_admin_url();?>">wordpress dashboard</a>.</p>
		 	</div>
		 
		 <?php 
		 
		 } }
	}
示例#22
0
 function update_notifier_menu()
 {
     global $xml, $theme_data, $themeupdatestatus;
     $themeupdatestatus = get_option(THEMESLUG . '_update_notifications');
     $update = "";
     if ($themeupdatestatus) {
         $xml = get_latest_theme_version(NOTIFIER_CACHE_INTERVAL);
         // Get the latest remote XML file on our server
         $theme_data = wp_get_theme();
         // Read theme current version from the style.css
         if ((double) $xml->latest > (double) $theme_data['Version']) {
             // Compare current theme version with the remote XML version
             $update = '<span class="update-plugins count-1"><span class="update-count">' . $xml->latest . '</span></span>';
         }
     }
     $k = array('update_notifications' => __("Theme Updates ", 'rt_theme_admin') . $update);
     array_merge($this->panel_pages, $k);
     $this->panel_pages = array_merge($this->panel_pages, $k);
 }
示例#23
0
function update_notifier()
{
    global $update_check_int, $update_check_int_seconds;
    $xml = get_latest_theme_version($update_check_int_seconds);
    // This tells the function to cache the remote call for 21600 seconds (6 hours)
    $theme_data = wp_get_theme();
    ?>

	<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;}
		ul {line-height:1;list-style: disc inside;}
		p span {font-weight:bold;padding-left:20px;}
	</style>

	<div class="wrap">

		<div id="icon-tools" class="icon32"></div>
		<h2><?php 
    echo $theme_data->get('Name');
    ?>
 Theme Updates</h2>
	    <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo $theme_data->get('Name');
    ?>
 theme available.</strong> You have version <?php 
    echo $theme_data->get('Version');
    ?>
 installed. Update to version <?php 
    echo $xml->latest;
    ?>
.</p></div>

        <img style="float: left; margin: 0 20px 20px 0; border: 1px solid #ddd; width:300px;" src="<?php 
    echo get_bloginfo('stylesheet_directory') . '/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 your <?php 
    echo $theme_data->get('Name');
    ?>
 Theme prior to upgrading.</p>
            <p>To update the Theme, login to your <a href="http://www.web-savvy-marketing.com/my-account/" target="_blank">My Account</a> page and re-download the theme like you did when you bought it.</p>
            <p>Extract the <strong><?php 
    echo strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $theme_data->get('Name'))));
    ?>
-<?php 
    echo $xml->latest;
    ?>
.zip</strong> file's contents, look for the extracted theme folder, upload the folder's contents using FTP to the <strong>/wp-content/themes/<?php 
    echo strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $theme_data->get('Name'))));
    ?>
/</strong> folder overwriting the old files (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.</p>
            <p>If you have made any changes to the theme files <strong>updating will overwrite your customizations</strong>. In that case you may elect not to update your theme. You may go to the <a href="<?php 
    echo site_url();
    ?>
/wp-admin/admin.php?page=patricia"><?php 
    echo $theme_data->get('Name');
    ?>
 Settings</a> page to disable this update notification.</p>
        </div>

            <div class="clear"></div>

	    <h3 class="title">Changelog</h3>
	    <?php 
    echo $xml->changelog;
    ?>

	</div>

<?php 
}
示例#24
0
function mts_update_notifier()
{
    $xml = get_latest_theme_version(43200);
    // Cache the remote call for 43200 seconds (12 hours)
    $theme_data = wp_get_theme();
    // Get the current version from style.css
    ?>
	
	<style>
		h3.title {margin: 30px 0 0 0; padding: 30px 0 0 0; border-top: 1px solid #ddd;}
	</style>

	<div class="wrap">
		<h2><?php 
    echo $theme_data['Name'];
    ?>
 <?php 
    _e('Theme Updates', 'mythemeshop');
    ?>
</h2>
	    <div id="message" class="updated below-h2"><p><strong><?php 
    _e('There is a new version of the theme available.', 'mythemeshop');
    ?>
</strong> <?php 
    _e('You have installed version', 'mythemeshop');
    ?>
 <?php 
    echo $theme_data['Version'];
    ?>
. <?php 
    _e('Update to version', 'mythemeshop');
    ?>
 <?php 
    echo $xml->latest;
    ?>
.</p></div>
        
        <img style="float: left; margin: 0 20px 20px 0; max-width: 300px;" src="<?php 
    echo get_bloginfo('template_url') . '/screenshot.png';
    ?>
" />
        
        <div id="instructions">
            <h3><?php 
    _e('Update Download and Instructions', 'mythemeshop');
    ?>
</h3>
            <p><strong><?php 
    _e('Please note', 'mythemeshop');
    ?>
:</strong> <?php 
    _e('make a backup</strong> of the Theme inside your WordPress installation folder', 'mythemeshop');
    ?>
 <strong>/wp-content/themes/</strong></p>
            <p><?php 
    _e('To update the Theme, login to your', 'mythemeshop');
    ?>
 <a href="https://mythemeshop.com/go/member" target="_blank"><?php 
    _e('MyThemeShop Account', 'mythemeshop');
    ?>
</a>, <?php 
    _e('head over to your <strong>Active Resources</strong> section and re-download the theme like you did when you bought it.', 'mythemeshop');
    ?>
</p>
            <p><?php 
    _e('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', 'mythemeshop');
    ?>
 <strong>/wp-content/themes/<?php 
    echo strtolower($theme_data['Name']);
    ?>
/</strong> <?php 
    _e('folder overwriting the old ones (this is why it\'s important to backup any changes you\'ve made to the theme files)', 'mythemeshop');
    ?>
.</p>
            <p><?php 
    _e('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.', 'mythemeshop');
    ?>
</p>
        </div>
        
            <div class="clear"></div>
	    
	    <h3 class="title"><?php 
    _e('Changelog', 'mythemeshop');
    ?>
</h3>
	    <?php 
    echo $xml->changelog;
    ?>

	</div>
    
<?php 
}