=== Catch Popup === Contributors: catchplugins, catchthemes, sakinshrestha, pratikshrestha, maheshmaharjan, dreamsapana Donate link: https://catchplugins.com/plugins/catch-popup/ Tags: popup, popups, shortcode Requires at least: 5.9 Requires PHP: 7.4 Tested up to: 7.0 Stable tag: 2.0 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html Catch Popup is a free versatile popup WordPress plugin to display exciting user-friendly popups. == Description == Catch Popup is a free versatile popup WordPress plugin that is power-packed with incredible features and customization option. It is completely responsive, flexible, and comes with a wide range of features so that you can customize every aspect of your popup. Even the smallest elements like Titles and Close button are loaded with customization options. Despite the plugin bursting with features, it is extremely easy to use. Features like Popup Themes, Triggers, Appearance, Close button, Targeting, and more are integrated into Catch Popup. All of these features are jam-packed with options inside. You have the hold of each and every aspect of the popup. In addition to its versatility, the WordPress Popup Plugin comes with five in-built popup themes. You can even add popups in your posts, pages, custom post types or anywhere you like with the shortcode option. Since popups can be an excellent marketing tool, Catch popup will help you boost your business and conversion through user-friendly popups. == Installation == The easy way (via Dashboard) : * Go to Plugins > Add New * Type in the **Catch Popup** in Search Plugins box * Click Install Now to install the plugin * After Installation click activate to start using the **Catch Popup** * Go to **Catch Popup** from Dashboard menu Not so easy way (via FTP) : * Download the **Catch Popup** * Unarchive **Catch Popup** plugin * Copy folder with catchp-popup.zip * Open the ftp \wp-content\plugins\ * Paste the plug-ins folder in the folder * Go to admin panel => open item "Plugins" => activate **Catch Popup** * Go to **Catch Popup** from Dashboard menu == Screenshot == 1. Catch popup trigger settings 2. Catch popup theme select settings 3. Catch popup display settings 4. Catch popup close button settings 5. Catch popup target settings 6. Catch popup theme settings == Changelog == = 2.0 (Released: May 21, 2026) = * Security Fix: Added nonce verification to catch_popup_get_data AJAX handler * Security Fix: Shortcode html_tag attribute now validated against an allowlist to prevent XSS * Security Fix: add_plugin_meta_links() output now escaped with wp_kses() * Security Fix: $_POST['post_ID'] sanitized with absint() before use in save handler * Security Fix: $_POST values unslashed before sanitization in catch_popup_save() * Bug Fixed: AJAX calls now pass nonce via cpop_object.ajax_nonce localized variable * Bug Fixed: $tag->post_title corrected to $tag->name for WP_Term objects in catch_popup_get_data() * Bug Fixed: get_posts() args corrected from 'status'=>'published' to 'post_status'=>'publish' * Bug Fixed: $styles['close']['font-family'] no longer stores a boolean from isset() * Bug Fixed: console.log(counter) debug statement removed from generated popup JS * Bug Fixed: Duplicate value attribute removed from catch_popup_auto_height checkbox * Bug Fixed: Dead code $popup->ID; standalone statements removed * Bug Fixed: Function renamed from something() to catch_popup_maybe_enqueue_assets() to prevent naming conflicts * Bug Fixed: $_GET['post_type'] and $_GET['action'] now sanitized with sanitize_key() before comparison * Bug Fixed: esc_html('Remove', 'catch-popup') corrected to esc_html__() so string is translatable * Bug Fixed: esc_html($post_value['post_title'], 'catch-popup') — spurious second argument removed * Bug Fixed: esc_attr() replaced with esc_html() for popup title element text in shortcode output * Bug Fixed: WP_Filesystem() now initialized before use in enqueue-scripts-styles.php * Bug Fixed: strtotime('now') replaced with time() * Bug Fixed: Duplicate ABSPATH guard removed from install-functions.php * Bug Fixed: Admin script version corrected from hardcoded '1.0.1' to CATCH_POPUP_VERSION * Bug Fixed: Admin scripts moved to footer for improved page performance * Bug Fixed: Replaced deprecated wp.editor.ServerSideRender with wp.serverSideRender — block was silently failing to register, making it invisible in the block inserter * Bug Fixed: Added missing wp-server-side-render script dependency to block registration * Bug Fixed: Replaced deprecated 'wp-editor' script dependency with 'wp-block-editor' in block registration * Code Quality: Plugin Check — NonceVerification.Missing in catch_popup_theme_save() fixed by checking nonce field presence before any $_POST access * Code Quality: Plugin Check — MissingUnslash in catch_popup_theme_save() fixed by calling wp_unslash() on the submitted popup_theme array before sanitizing individual fields * Code Quality: Plugin Check — NonceVerification.Recommended for $_GET reads in catch_popup_maybe_enqueue_assets() suppressed with phpcs:ignore; these params are read only to detect the current admin page, not to process user input * Code Quality: Plugin Check — NonPrefixedHooknameFound fixed; filter hooks generated_css, theme_get_generated_styles, generate_popup_theme_styles, and generate_popup_styles now all carry the catch_popup_ prefix * Code Quality: Plugin Check — NonPrefixedVariableFound fixed; global-scope loop variable $hook in catch-popup-editor-button.php renamed to $catch_popup_hook * Bug Fixed: "Error loading block: Invalid parameter(s): attributes" — replaced ServerSideRender REST call with a static editor placeholder; the block trigger preview now renders instantly in the editor without any REST API round-trip * Bug Fixed: Click-triggered popups never opened — wp_strip_all_tags() was used to write the generated JS cache file, which silently deleted all JavaScript content inside the