<?php
/*
Plugin Name: Disable Plugin Updates
Plugin URI: https://kranzworthmedia.com/
Description: Prevents specific plugins from updating.
Version: 1.0
Author: Josh VanNoord
Author URI: http://kranzworthmedia.com/
*/
// Disable updates for a specific plugin.
add_filter('site_transient_update_plugins', function ($value) {
if (isset($value->response['js_composer/js_composer.php'])) {
unset($value->response['js_composer/js_composer.php']);
}
return $value;
});
add_action('wp_footer', function () {
if (is_user_logged_in() && current_user_can('administrator')) {
global $template;
echo '<div style="background: #000; color: #fff; padding: 10px; position: fixed; bottom: 0; left: 0; z-index: 9999;">';
echo 'Template File: ' . basename($template);
echo '</div>';
}
});
?>