Skip to content

Commit

Permalink
Merge pull request #1241 from Automattic/alpha
Browse files Browse the repository at this point in the history
Release Nov 13
  • Loading branch information
dkoo authored Nov 13, 2023
2 parents d75d48c + f08c454 commit abb5e5b
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 74 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [2.26.0-alpha.1](https://github.com/Automattic/newspack-popups/compare/v2.25.0...v2.26.0-alpha.1) (2023-10-31)


### Features

* segmentation criteria for subscriptions and memberships ([#1230](https://github.com/Automattic/newspack-popups/issues/1230)) ([bef21e0](https://github.com/Automattic/newspack-popups/commit/bef21e0babaf2590d28b75177e171397d68d4d4e))

# [2.25.0](https://github.com/Automattic/newspack-popups/compare/v2.24.0...v2.25.0) (2023-10-31)


Expand Down
8 changes: 7 additions & 1 deletion includes/class-newspack-popups-inserter.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,14 @@ private static function is_memberships_restricted( $post_id = null ) {
* @param string $content The content of the post.
*/
public static function insert_popups_in_content( $content = '' ) {
$post = get_post();

if ( ! $post ) {
return $content;
}

$filtered_content = explode( "\n", $content );
$post_content = explode( "\n", get_post()->post_content );
$post_content = explode( "\n", $post->post_content );
if (
// Avoid duplicate execution.
true === self::$the_content_has_rendered
Expand Down
2 changes: 1 addition & 1 deletion newspack-popups.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Author URI: https://newspack.com
* Text Domain: newspack-popups
* Domain Path: /languages
* Version: 2.25.0
* Version: 2.26.0-alpha.1
*
* @package Newspack_Popups
*/
Expand Down
143 changes: 98 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "newspack-popups",
"version": "2.25.0",
"version": "2.26.0-alpha.1",
"main": "Gruntfile.js",
"author": "Automattic",
"scripts": {
Expand Down Expand Up @@ -42,6 +42,6 @@
"newspack-scripts": "^5.1.0",
"postcss-scss": "^4.0.9",
"prettier": "npm:wp-prettier@^2.2.1-beta-1",
"stylelint": "^15.10.3"
"stylelint": "^15.11.0"
}
}
Loading

0 comments on commit abb5e5b

Please sign in to comment.