function update_notifier()
{
    $xml = get_latest_plugin_version(PLUGIN_NOTIFIER_CACHE_INTERVAL);
    // Get the latest remote XML file on our server
    $plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . NOTIFIER_PLUGIN_FOLDER_NAME . '/' . NOTIFIER_PLUGIN_FILE_NAME);
    // Read plugin current version from the main plugin file
    ?>
	
	<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_PLUGIN_NAME;
    ?>
 Plugin Updates</h2>
                <div id="message" class="updated below-h2"><p><strong>There is a new version of the <?php 
    echo NOTIFIER_PLUGIN_NAME;
    ?>
 plugin available.</strong> You have version <?php 
    echo $plugin_data['Version'];
    ?>
 installed. Update to version <?php 
    echo $xml->latest;
    ?>
.</p></div>
		
		<div id="instructions">
		    <h3>Update Download and Instructions</h3>
		    <p><strong>Please note:</strong> make a <strong>backup</strong> of the Plugin inside your WordPress installation folder <strong>/wp-content/plugins/<?php 
    echo NOTIFIER_PLUGIN_FOLDER_NAME;
    ?>
/</strong></p>
		    <p>To update the Theme, login to <a href="http://www.codecanyon.net/">CodeCanyon</a>, head over to your <strong>downloads</strong> section and re-download the plugin like you did when you bought it.</p>
		    <p>Extract the zip's contents, look for the extracted plugin folder, and after you have all the new files upload them using FTP to the <strong>/wp-content/plugins/<?php 
    echo NOTIFIER_PLUGIN_FOLDER_NAME;
    ?>
/</strong> folder overwriting the old ones (this is why it's important to backup any changes you've made to the plugin files).</p>
		    <p>If you didn't make any changes to the plugin files, you are free to overwrite them with the new ones without the risk of losing any plugins settings, and backwards compatibility is guaranteed.</p>
		</div>
	    
	    <h3 class="title">Changelog</h3>
	    <?php 
    echo $xml->changelog;
    ?>

	</div>
    
<?php 
}
Пример #2
0
function print_screen($current_plugin_version)
{
    $latest_tp_plugin_version = 'sm-2a_' . get_latest_plugin_version();
    $mobiquo_path = get_path();
    $check_upload_status = file_get_contents("http://" . $mobiquo_path . "/upload.php?checkAccess");
    $check_push_status = file_get_contents("http://" . $mobiquo_path . "/push.php?checkAccess");
    require_once dirname(dirname(__FILE__)) . '/SSI.php';
    global $modSettings;
    echo "Forum XMLRPC Interface for Tapatalk Application<br><br>";
    //echo "Forum system version:".$modSettings['smfVersion']."<br>";
    echo "Current Tapatalk plugin version: " . $current_plugin_version . "<br>";
    echo "Latest Tapatalk plugin version: <a href=\"https://tapatalk.com/activate_tapatalk.php?plugin=smf\" target=\"_blank\">" . $latest_tp_plugin_version . "</a><br>";
    echo "Attachment upload interface status: <a href=\"http://" . $mobiquo_path . "/upload.php\" target=\"_blank\">" . ($check_upload_status ? 'OK' : 'Inaccessible') . "</a><br>";
    echo "Push notification interface status: <a href=\"http://" . $mobiquo_path . "/push.php\" target=\"_blank\">" . ($check_push_status ? 'OK' : 'Inaccessible') . "</a><br>";
    echo "<br>\n<a href=\"http://tapatalk.com/api.php\" target=\"_blank\">Tapatalk API for Universal Forum Access</a><br>\nFor more details, please visit <a href=\"http://tapatalk.com\" target=\"_blank\">http://tapatalk.com</a>";
}