Changeset 2205904
- Timestamp:
- 12/04/2019 01:27:19 PM (6 years ago)
- Location:
- wp-pop-up/trunk
- Files:
-
- 3 edited
-
classes/class-wp-popup.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
-
wp-popup.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-pop-up/trunk/classes/class-wp-popup.php
r2124870 r2205904 20 20 class WP_Popup { 21 21 22 23 22 /** 24 23 * Configuration object for the current popup … … 155 154 156 155 add_action( 'wp_footer', array( $this, 'footer' ) ); 156 add_action( 'elementor/frontend/the_content', array( $this, 'elementor_footer' ) ); 157 157 add_action( 'wp_enqueue_scripts', array( $this, 'assets' ) ); 158 158 add_action( 'admin_notices', array( $this, 'multiple_instances_admin_notice' ) ); … … 555 555 556 556 /** 557 * Make the popup work with Elementor. 558 * 559 * Disable Elementor's HTML markup that gets applied when using the_content filter and having this popup appear on Elementor enabled pages. 560 * 561 * @param string $elementor_content Elementor's default markup along with the post content from our popup itself. 562 * 563 * @return string WP Popup content without Elementor markup or Elementor marked up page. 564 */ 565 public function elementor_footer( $elementor_content ) { 566 // Don't do anything if there's no overlay on this page. 567 if ( ! $this->config->current_id ) { 568 return $elementor_content; 569 } 570 571 // Variables for the modal template 572 $content = apply_filters( 'the_content', get_post_field( 'post_content', $this->config->current_id ) ); 573 // Load the modal markup 574 ob_start(); 575 include_once dirname( __DIR__ ) . '/templates/popup.php'; 576 $content = ob_get_contents(); 577 578 if ( ! empty( $content ) ) { 579 return $content; 580 } 581 582 return $elementor_content; 583 } 584 585 /** 557 586 * Loop through the possible CSS Rules to check if there's post_meta for it 558 587 */ -
wp-pop-up/trunk/readme.txt
r2191054 r2205904 70 70 == Changelog == 71 71 72 = 1.1.4 = 73 * Fix bug where popups would not work on Elementor pages. The popups would show the post content (including Elementor styles) in the popup instead of showing the popup's content. 74 72 75 = 1.1.3 = 73 76 * Fix minor styling issue with spinning loading gif in the admin. -
wp-pop-up/trunk/wp-popup.php
r2124871 r2205904 3 3 Plugin Name: WP Pop-up 4 4 Description: Show a highly-configurable popup for your pages to encourage donations, actions. etc. 5 Version: 1.1. 35 Version: 1.1.4 6 6 Author: Cornershop Creative 7 7 Author URI: https://cornershopcreative.com … … 14 14 } 15 15 16 define( 'WP_POPUP_VERSION', '1.1.3' ); 16 $wp_popup_plugin_data = get_plugin_data( __FILE__, true ); 17 define( 'WP_POPUP_VERSION', $wp_popup_plugin_data['Version'] ); 18 // remove from global so we don't pollute global 19 unset( $wp_popup_plugin_data ); 17 20 18 21 require_once dirname( __FILE__ ) . '/classes/class-wp-popup.php';
Note: See TracChangeset
for help on using the changeset viewer.