'),
sprintf(
/* translators: 1: WordPress version, 2: SiteSEO version */
esc_html__('WordPress %1$s | SiteSEO %2$s', 'siteseo'),
esc_html($wp_version),
esc_html(SITESEO_VERSION)
)
);
remove_filter('update_footer', 'core_update_footer');
return ob_get_clean();
}
static function update_notice(){
if(defined('SOFTACULOUS_PLUGIN_UPDATE_NOTICE')){
return;
}
$to_update_plugins = apply_filters('softaculous_plugin_update_notice', []);
if(empty($to_update_plugins)){
return;
}
/* translators: %1$s is replaced with a "string" of name of plugins, and %2$s is replaced with "string" which can be "is" or "are" based on the count of the plugin */
$msg = sprintf(__('New version of %1$s %2$s available. Updating ensures better performance, security, and access to the latest features.', 'siteseo'), ''.esc_html(implode(', ', $to_update_plugins)).'', (count($to_update_plugins) > 1 ? 'are' : 'is')) . ' Update Now';
define('SOFTACULOUS_PLUGIN_UPDATE_NOTICE', true); // To make sure other plugins don't return a Notice
echo '
'.$msg. '
';
wp_register_script('siteseo-update-notice', '', ['jquery'], SITESEO_VERSION, true);
wp_enqueue_script('siteseo-update-notice');
wp_add_inline_script('siteseo-update-notice', 'jQuery("#siteseo-plugin-update-notice").on("click", function(e){
let target = jQuery(e.target);
if(!target.hasClass("notice-dismiss")){
return;
}
var data;
// Hide it
jQuery("#siteseo-plugin-update-notice").hide();
// Save this preference
jQuery.post("'.admin_url('admin-ajax.php?action=siteseo_close_update_notice').'&security='.wp_create_nonce('siteseo_promo_nonce').'", data, function(response) {
//alert(response);
});
});');
}
}