Skip to content

Commit

Permalink
Merge branch 'hotfix/1.10.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
danieliser committed Apr 21, 2020
2 parents c7373c4 + 7db4fff commit f415e98
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 15 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
### Unreleased Changes

### v1.10.0 - TBD
### v1.10.1 - 04/21/2020
* Fix: Typo in filter name caused extra p tags.
* Fix: Add wp version check to prevent calling block functions on older versions or classicpress.
* Fix: Font Awesome support now works for v4 fonts.

### v1.10.0 - 04/20/2020
* Feature: Display presets for top bar, bottom right slide-ins, full-screen popups & bottom left notifications to make it simple to get common setups done much quicker
* Feature: Popup Trigger inline text format for the block editor.
* Feature: Turn any block in Gutenberg block editor into a popup trigger.
Expand Down
22 changes: 14 additions & 8 deletions classes/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public static function init() {
* Hook core filters into `pum_popup_content`.
*/
public static function add_core_content_filters() {
global $wp_version;

/**
* Copied from wp-includes/class-wp-embed.php:32:40
*
Expand Down Expand Up @@ -47,7 +49,9 @@ public static function add_core_content_filters() {
* @since 1.10.0
* @sinceWP 5.4
*/
add_filter( 'pum_popup_content', [ __CLASS__, 'do_blocks' ], 9 );
if ( version_compare( $wp_version, '5.0.0', '>=' ) ) {
add_filter( 'pum_popup_content', [ __CLASS__, 'do_blocks' ], 9 );
}
add_filter( 'pum_popup_content', 'wptexturize' );
add_filter( 'pum_popup_content', 'convert_smilies', 20 );
add_filter( 'pum_popup_content', 'wpautop' );
Expand All @@ -70,7 +74,8 @@ public static function add_core_content_filters() {
/**
* Parses dynamic blocks out of `post_content` and re-renders them.
*
* @since 5.0.0
* @since 1.10.0
* @sinceWP 5.0.0
*
* @param string $content Post content.
* @return string Updated post content.
Expand All @@ -94,21 +99,22 @@ public static function do_blocks( $content ) {
}

/**
* If do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards,
* for subsequent `the_content` usage.
* If do_blocks() needs to remove wpautop() from the `pum_popup_content` filter, this re-adds it afterwards,
* for subsequent `pum_popup_content` usage.
*
* @access private
*
* @since 5.0.0
* @since 1.10.0
* @sinceWP 5.0.0
*
* @param string $content The post content running through this filter.
* @return string The unmodified content.
*/
public static function _restore_wpautop_hook( $content ) {
$current_priority = has_filter( 'the_content', [ __CLASS__, '_restore_wpautop_hook' ] );
$current_priority = has_filter( 'pum_popup_content', [ __CLASS__, '_restore_wpautop_hook' ] );

add_filter( 'the_content', 'wpautop', $current_priority - 1 );
remove_filter( 'the_content', [ __CLASS__, '_restore_wpautop_hook' ], $current_priority );
add_filter( 'pum_popup_content', 'wpautop', $current_priority - 1 );
remove_filter( 'pum_popup_content', [ __CLASS__, '_restore_wpautop_hook' ], $current_priority );

return $content;
}
Expand Down
2 changes: 1 addition & 1 deletion includes/functions/popups/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function pum_popup_close_text( $popup_id = null ) {
$close_text = $popup->close_text();

// If the close text is a font awesome icon (E.g. "fas fa-camera"), add the icon instead of the text.
if ( preg_match( "/^fa[srldb]\s.+/i", $close_text ) ) {
if ( preg_match( "/^fa[srldb]?\s.+/i", $close_text ) ) {
echo '<i class="' . esc_attr( $close_text ) . '"></i>';
} else {
echo esc_html( $close_text );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "popup-maker",
"version": "1.10.0",
"version": "1.10.1",
"description": "WordPress Popup Plugin",
"homepage": "https://wppopupmaker.com",
"author": "Code Atlantic LLC",
Expand Down
4 changes: 2 additions & 2 deletions popup-maker.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Popup Maker
* Plugin URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=plugin-uri
* Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
* Version: 1.10.0
* Version: 1.10.1
* Author: Popup Maker
* Author URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
* License: GPL2 or later
Expand Down Expand Up @@ -93,7 +93,7 @@ class Popup_Maker {
/**
* @var string Plugin Version
*/
public static $VER = '1.10.0';
public static $VER = '1.10.1';

/**
* @var int DB Version
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tags: marketing, popup, popups, optin, advertising, conversion, responsive popu
Requires at least: 4.1
Tested up to: 5.4
Requires PHP: 5.6
Stable tag: 1.10.0
Stable tag: 1.10.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -125,6 +125,11 @@ There are several common causes for this, check [this guide for help](https://do

View our [complete changelog](https://github.com/PopupMaker/Popup-Maker/blob/master/CHANGELOG.md) for up-to-date information on what has been going on with the development of Popup Maker.

= v1.10.1 - 04/21/2020 =
* Fix: Typo in filter name caused extra p tags.
* Fix: Add wp version check to prevent calling block functions on older versions or classicpress.
* Fix: Font Awesome support now works for v4 fonts.

= v1.10.0 - 04/20/2020 =
* Feature: Display presets for top bar, bottom right slide-ins, full-screen popups & bottom left notifications to make it simple to get common setups done much quicker
* Feature: Popup Trigger inline text format for the block editor.
Expand Down
2 changes: 1 addition & 1 deletion tasks/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build": {
"files": "./**/*.*",
"ignore": [
"./packages/",
"./packages/**",
"./bin/**",
"./build/**",
"./release/**",
Expand Down

0 comments on commit f415e98

Please sign in to comment.