Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Nov 13 #1241

Merged
merged 5 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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