| 开发者 |
InDesignMedia
indesignmedia |
|---|---|
| 更新时间 | 2026年8月11日 19:07 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
rel="noopener noreferrer").
Analytics and Tracking (new in 2.0.0)
id matching your Popup ID slug, so any existing GTM click trigger or Element Visibility trigger can target it directly with zero GTM changes.window.dataLayer:popup_view when the popup appears.popup_click when the popup image/link is clicked.popup_close when the popup is closed (X, overlay, or auto-close).popup_id and popup_title. Click events also add link_url. Close events also add close_reason (button, overlay, or auto) and time_shown_ms. Use these in GA4 to filter and report per popup.
Native WordPress Integration
uninstall.php removes all popup posts and plugin options when you delete the plugin.id-popup.zip file and click Install Now.homepage_summer_sale).popup_view, popup_click, and popup_close events in GA4.Yes. Version 1.2 introduced a Custom Post Type architecture and later versions keep it. You can create unlimited independent popups, each with its own images, display rules, schedule, and tracking, all managed from the Popup Ad menu in your admin sidebar.
Yes. Upload a desktop image and a mobile image in the Media tab. If one is missing, the popup is automatically hidden on that device so you never see broken images or empty containers.
It controls the popup width on devices under 768px, as a percentage of the viewport. Default is 90%. Set a lower value if you want smaller popups on phones, or 100% for edge-to-edge.
When on, the popup displays your site logo (the one set in Customizer, Site Identity, Logo) above the popup image at the top-left. It uses the current logo automatically, so if you change the logo in the Customizer, the popup updates too.
Yes. Set a Start Date and Time, an End Date and Time, or both. Each boundary is evaluated independently, so you can run an end-date-only sunset campaign without setting a start date.
Yes. As of 2.0.0, start and end dates are compared using the WordPress timezone from Settings, General, Timezone. Before 2.0.0 the plugin used the server timezone, which could cause popups to fire early or late on hosts where the two differed.
Yes. Use the Display Rules dropdown and pick Specific Page(s), Specific Post(s), or (when WooCommerce is active) Specific Product Page(s). A live search picker lets you find items by name without needing to know IDs.
Yes. When WooCommerce is active, two extra rules appear: All Product Pages and Specific Product Page(s).
Yes. The Home Page rule was improved in 2.0.0 to reliably detect the site root even on Elementor-built or custom-template homepages that bypass the standard WordPress main query.
Open your popup ad from Popup Ad, All Popup Ads, click the Tracking tab, turn on Enable Tracking, and set a unique Popup ID slug. The plugin then pushes popup_view, popup_click, and popup_close events to the browser dataLayer, and also adds an HTML id matching your slug to the popup link so existing DOM-based GTM triggers work. Wire matching Custom Event triggers in GTM and register popup_id as a custom dimension in GA4 to see per-popup reports.
#technology_popup_ad?Just enter that same slug (technology_popup_ad) in the Popup ID field on the Tracking tab. The plugin will output the popup link with that HTML ID, and your existing trigger and tag will fire without any GTM changes.
Auto Close After (s) sets how many seconds after opening the popup automatically closes. Set it to 0 to disable auto-close entirely and keep the popup open until the visitor closes it.
Yes. Every popup is rendered independently. If two published popups both match the current page and current schedule, both will show. Use scheduling and display rules to control which one appears when.
The plugin automatically detects your old settings and migrates them into a new popup post called Default Popup on the first admin load after upgrading. No data is lost, no manual steps are needed.
As of 2.0.0, the plugin ships with a proper uninstall.php that removes all popup posts (Custom Post Type entries and their meta) and clears the plugin's own options. If you only Deactivate the plugin, your data stays intact.
Yes. All 2.x versions preserve every option key, meta key, hook, and shortcode from previous versions. Your existing popups keep their settings and keep working without any manual changes.
body (Bootstrap, some builders) which previously could stretch or push the layout.overflow-x: hidden inside the popup container on mobile so oversized images cannot spill sideways.img { max-width: 100% } on mobile with priority so the popup image can never exceed the popup width.body gets an id-popup-open class that disables page scroll, so tapping the popup cannot accidentally move the page underneath.inset: 0 shorthand on the overlay with explicit top/right/bottom/left: 0 for compatibility with older mobile browsers (pre Chrome 87 / Safari 14.1).-webkit-transform fallback on the popup container for older mobile Safari.
Close Button on Mobile
id matching your slug (works with existing DOM-based GTM click and Element Visibility triggers).window.dataLayer: popup_view, popup_click, popup_close.popup_id, popup_title, link_url, close_reason (button, overlay, auto), time_shown_ms.
Modernized Admin UI
is_front_page() and is_home(), plus a URL-path fallback, so page builders and custom templates that bypass main-query conditionals (Elementor, custom themes) still resolve the site root correctly.
Bug Fixes
uninstall.php that removes all popup posts and plugin options on plugin deletion (multisite-safe).
wp_die() after wp_send_json_error() in AJAX handler to prevent continued execution after unauthorized access.type parameter in the AJAX search handler against known post types, unknown types are rejected with wp_die().popup_link sanitization from sanitize_text_field() to esc_url_raw(), the correct WordPress standard for URL fields stored in the database.display_rules using in_array() with type checking.specific_ids to integers using intval, eliminating string injection risk through ID fields.esc_html() to post titles and absint() to IDs in AJAX JSON responses.esc_attr() to desktop_max_width in inline style output.
Bug Fixes
0 not working. parseInt(0) || 15000 was incorrectly evaluating to 15000. Now uses isNaN() check so 0 correctly disables auto-close.
data() returns a string but was compared with === 0 (integer). Wrapped with parseInt() for correct type coercion.$preview_style PHP variable that was computed but never used.
Performance
no_found_rows: true and update_post_term_cache: false to the frontend WP_Query to skip unnecessary database queries.
class_exists('WooCommerce')).product post type when specific_products rule is selected.
Select2 Improvements
specific_products rule.
Display Rule Precision
is_singular('post') instead of is_single(), correctly excluding custom post types and WooCommerce products.
is_singular('post') + get_queried_object_id() matching, consistent with the specific pages and products pattern.get_queried_object_id() for ID matching instead of passing an array to is_page().id_popup).id_popup_settings option into a new "Default Popup" post, no data loss on upgrade.
Frontend Multi-Popup Support
WP_Query to loop all published id_popup posts.
#id-popup) to classes (.id-popup-container, .id-popup-overlay) to support multiple popups on one page.data-delay and data-autoclose attributes, no global JS variables.
Image Handling
data-has-desktop, data-has-mobile) evaluated fresh per popup per page load.wp_get_attachment_image_url().attachment_url_to_postid() fallback for legacy string URL values.#.