Merge pull request 'Remove Debug Code for version' (#5) from fix-debug-notice into main
All checks were successful
Create Release / build (push) Successful in 3s
All checks were successful
Create Release / build (push) Successful in 3s
Reviewed-on: #5
This commit is contained in:
commit
10634e8f7e
@ -48,11 +48,6 @@ function fwembed_check_for_updates() {
|
||||
if ($response) {
|
||||
$release_info = json_decode($response);
|
||||
|
||||
// Update debug info with latest version
|
||||
$debug_data['latest_version'] = $release_info->tag_name ?? 'Not found';
|
||||
$debug_data['response'] = substr(print_r($release_info, true), 0, 1000);
|
||||
update_option('fwembed_update_debug', $debug_data);
|
||||
|
||||
// Get latest version from tag name
|
||||
$latest_version = $release_info->tag_name;
|
||||
|
||||
@ -96,8 +91,8 @@ function fwembed_check_for_updates() {
|
||||
'package' => $download_url,
|
||||
'icons' => [],
|
||||
'banners' => [],
|
||||
'tested' => '6.4.2',
|
||||
'requires' => '5.0',
|
||||
'tested' => '6.8',
|
||||
'requires' => '6.2',
|
||||
'compatibility' => new stdClass(),
|
||||
];
|
||||
|
||||
@ -108,23 +103,6 @@ function fwembed_check_for_updates() {
|
||||
}
|
||||
add_action('admin_init', 'fwembed_check_for_updates');
|
||||
|
||||
// Add admin notice for debugging
|
||||
add_action('admin_notices', function() {
|
||||
if (current_user_can('manage_options')) {
|
||||
$debug = get_option('fwembed_update_debug', []);
|
||||
echo '<div class="notice notice-info is-dismissible"><p>Update Debug: Current: ' .
|
||||
esc_html($debug['current_version'] ?? 'N/A') . ', Latest: ' .
|
||||
esc_html($debug['latest_version'] ?? 'N/A') . '</p>';
|
||||
|
||||
// Detailed debug info with query param
|
||||
if (isset($_GET['fwembed_debug'])) {
|
||||
echo '<pre>' . esc_html(print_r($debug, true)) . '</pre>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Add plugin information for the details popup/changelog
|
||||
add_filter('plugins_api', function($result, $action, $args) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user