/** * @package Kopa * @subpackage Core * @author thethangtran <*****@*****.**> * @since 1.0.0 */ function kopa_update_notices() { $xml = KopaUtil::get_theme_info(); if ($xml) { $theme_data = wp_get_theme(); if (version_compare($theme_data['Version'], $xml->version) == -1) { $out = '<div class="updated kopa_update_info">'; $out .= sprintf('<p>Latest version of <b>%1$s</b> theme is <b>%2$s</b> - <a href="%3$s">Update Now</a> - <a href="%4$s" target="_blank">View Change Log</a></p>', $xml->name, $xml->version, $xml->download, $xml->changelog); $out .= '</div>'; echo $out; } } }