_e('Credits & Thanks', 'tarski'); ?> </a> | <a href="http://tarskitheme.com/forum/"><?php _e('Forum', 'tarski'); ?> </a> </p> </div> <div id="tarski-update-notifier" class="secondary"><div class="section"> <?php if (!detectWPMU() || detectWPMUadmin()) { ?> <?php if (can_get_remote()) { ?> <h3><?php _e('Update Notification', 'tarski'); ?> </h3> <?php if (get_tarski_option('update_notification')) { ?> <p><?php _e('Tarski is set to notify you when an update is available.', 'tarski'); ?> </p> <?php } else { ?>
/** * tarski_update_notifier() - Performs version checks and outputs the update notifier. * * Creates a new Version object, checks the latest and current * versions, and lets the user know whether or not their version * of Tarski needs updating. The way it displays varies slightly * between the WordPress Dashboard and the Tarski Options page. * @since 2.0 * @param string $location * @return string */ function tarski_update_notifier($messages) { global $plugin_page; if (!is_array($messages)) { $messages = array(); } $version = new Version(); $version->current_version_number(); $svn_link = 'http://tarskitheme.com/help/updates/svn/'; // Update checking only performed when remote files can be accessed if (can_get_remote()) { // Only performs the update check when notification is enabled if (get_tarski_option('update_notification')) { $version->latest_version_number(); $version->latest_version_link(); $version->version_status(); if ($version->status == 'older') { $messages[] = sprintf(__('A new version of the Tarski theme, version %1$s %2$s. Your installed version is %3$s.', 'tarski'), "<strong>{$version->latest}</strong>", '<a href="' . $version->latest_link . '">' . __('is now available', 'tarski') . '</a>', "<strong>{$version->current}</strong>"); } elseif ($plugin_page == 'tarski-options') { switch ($version->status) { case 'current': $messages[] = sprintf(__('Your version of Tarski (%s) is up to date.', 'tarski'), "<strong>{$version->current}</strong>"); break; case 'newer': $messages[] = sprintf(__('You appear to be running a development version of Tarski (%1$s). Please ensure you %2$s.', 'tarski'), "<strong>{$version->current}</strong>", "<a href=\"{$svn_link}\">" . __('stay updated', 'tarski') . '</a>'); break; case 'no_connection': case 'error': $messages[] = sprintf(__('No connection to update server. Your installed version is %s.', 'tarski'), "<strong>{$version->current}</strong>"); break; } } } elseif ($plugin_page == 'tarski-options') { $messages[] = sprintf(__('Update notification for Tarski is disabled. Your installed version is %s.', 'tarski'), "<strong>{$version->current}</strong>"); } } return $messages; }