Update Source ' . $badge_text . ''; $links[] = $update_source_link; return $links; } /** * Add the update source modal to the admin footer */ public function add_update_source_modal() { if (!is_admin() || !current_user_can('manage_options')) { return; } // Only show on plugins page $screen = get_current_screen(); if (!$screen || $screen->id !== 'plugins') { return; } // Get current source $current_source = get_option('fpden_update_source', 'auto'); // Enqueue the CSS and JS wp_enqueue_style( 'fpden-update-source-selector', FPDEN_PLUGIN_URL . 'admin/css/update-source-selector.css', array(), FPDEN_VERSION ); wp_enqueue_script( 'fpden-update-source-selector', FPDEN_PLUGIN_URL . 'admin/js/update-source-selector.js', array('jquery'), FPDEN_VERSION, true ); // Add nonce to the existing fpdenData object or create it if it doesn't exist $nonce = wp_create_nonce('fpden_update_source'); wp_localize_script( 'fpden-update-source-selector', 'fpdenData', array( 'updateSourceNonce' => $nonce, ) ); // Modal HTML ?>