开发者 |
drywallbmb
rxnlabs dannycorner rpasillas kenjigarland xavierserranoa |
---|---|
更新时间 | 2024年12月3日 01:24 |
PHP版本: | 4.3 及以上 |
WordPress版本: | 6.7.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
wp-popup
directory to your plugins directory (typically wp-content/plugins)Yes! Upon activating the plugin your previous popups will display in the WP Popups menu item and will continue working as expected.
As many as you want, though only one will show on any given URL, unless the wp_popup_display
filter is used to specify a popup to display via the theme.
To avoid annoying your site users with multiple popups, WP Popup will only display the most recent one, unless the wp_popup_display
filter is used to specify a popup to display via the theme.
`
// Example wp_popup_filter, show popup 1 if user is logged in, popup 2 if user is not logged in
function theme_filter_popups( $default_display, $display, $popup_id ) {
if ( is_user_logged_in() && 1 === $popup_id ) {
return true;
} elseif ( ! is_user_logged_in() && 2 === $popup_id ) {
return true;
}
return null;
}
add_filter( 'wp_popup_display', 'theme_filter_popups', 10, 3 );
`
WP Popup was written to be lean & mean. It offers minimal styling out-of-the-box (just a small close X in the upper right corner) and no animation controls, so that it doesn't bloat your site with unnecessary code for different themes & styles you're not actually using. Of course, you're free to use the WYSIWYG and graft on your own custom CSS to change the appearance however you want!
WP Popup has been tested with the following pagebuilders: Elementor, Beaver Builder, and WPBakery/Visual Composer. WP Popup may work with other pagebuilders but has not been tested for compatibility. While WP Popup may work with pagebuilder plugins, it was not designed as a pagebuilder add-on, so we cannot guarantee 100% compatibility.
post__not_in
query var incorrectly (a rare situation).wp_popup_content
, instead of changing which callbacks are bound to the_content
. This fixes potential PHP errors that could have occurred on sites using Fusion Builder, and possibly other plugins as well.