From 79c3a6f012d6ae9192991586f0e439fa91ae2c86 Mon Sep 17 00:00:00 2001 From: ValentinaIzzo <87989995+ValentinaIzzo@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:30:02 +0200 Subject: [PATCH 1/8] Update readme.txt (#1738) --- src/readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/readme.txt b/src/readme.txt index 46b79c13b..bee652870 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -2,7 +2,7 @@ Author URL: https://wordlift.io Plugin URL: https://wordlift.io Contributors: wordlift, insideout10, ziodave -Tags: SEO, SERP, FAQ Markup, Schema Markup, structured data, schema.org, schema org, semantic seo, JSON-LD, artificial intelligence, ai, linked data, semantic web, content recommendation, related posts, timeline, knowledge graph, interactive map, classicpress +Tags: SEO, structured data, ai, linked data, semantic web Requires at least: 5.3 Tested up to: 6.5 Requires PHP: 5.6 From de1fda7a1a0b9f91be7a2637b0734aa1e2c92216 Mon Sep 17 00:00:00 2001 From: David Riccitelli Date: Wed, 10 Jul 2024 11:33:24 +0300 Subject: [PATCH 2/8] declare support for WP 6.6 --- src/readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/readme.txt b/src/readme.txt index bee652870..e7155fc92 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -4,7 +4,7 @@ Plugin URL: https://wordlift.io Contributors: wordlift, insideout10, ziodave Tags: SEO, structured data, ai, linked data, semantic web Requires at least: 5.3 -Tested up to: 6.5 +Tested up to: 6.6 Requires PHP: 5.6 Stable tag: 3.52.8 License: GPLv2 or later From fd2ee90cb4eef0273d74ac42d58a3da03966338d Mon Sep 17 00:00:00 2001 From: David Riccitelli Date: Wed, 10 Jul 2024 16:56:08 +0300 Subject: [PATCH 3/8] check readme.txt --- .../wordpress/docker-entrypoint-init.d/10-wordpress-extra.sh | 2 +- .github/workflows/publish-readme.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.docker/wordpress/docker-entrypoint-init.d/10-wordpress-extra.sh b/.docker/wordpress/docker-entrypoint-init.d/10-wordpress-extra.sh index 4cec902fe..110c3ab84 100755 --- a/.docker/wordpress/docker-entrypoint-init.d/10-wordpress-extra.sh +++ b/.docker/wordpress/docker-entrypoint-init.d/10-wordpress-extra.sh @@ -18,7 +18,7 @@ echo "** Set the rewrite structure **" wp --skip-plugins --skip-themes rewrite structure '/%postname%/' echo "** Installing and Activating plugins **" -wp plugin install woocommerce wordpress-seo wp-recipe-maker query-monitor wp-crontrol --force --activate || true +wp plugin install classic-editor woocommerce wordpress-seo wp-recipe-maker query-monitor wp-crontrol --force --activate || true echo "** Creating wladmin user **" # Check if the user exists diff --git a/.github/workflows/publish-readme.sh b/.github/workflows/publish-readme.sh index f9aedf06e..34cc8598b 100755 --- a/.github/workflows/publish-readme.sh +++ b/.github/workflows/publish-readme.sh @@ -10,6 +10,9 @@ if [[ 'src/readme.txt' == "$(git diff HEAD^ HEAD --name-only)" ]]; then version="$(get_version)" sed -i "s|^Stable tag: .*$|Stable tag: $version|g" src/readme.txt + echo "** readme.txt new contents: " + cat src/readme.txt + # Update readme.txt in trunk and stable version tag. # shellcheck disable=SC2086 svnmucc -u $SVN_USERNAME -p $SVN_PASSWORD --non-interactive --trust-server-cert \ From 5c799be877c7fe2e076f2d823cff78cbd0c57a16 Mon Sep 17 00:00:00 2001 From: David Riccitelli Date: Wed, 10 Jul 2024 16:58:56 +0300 Subject: [PATCH 4/8] enable workflow_dispatch --- .github/workflows/publish-readme.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-readme.yml b/.github/workflows/publish-readme.yml index c47712d24..2d4dd5f3b 100644 --- a/.github/workflows/publish-readme.yml +++ b/.github/workflows/publish-readme.yml @@ -4,6 +4,7 @@ on: push: branches: - main + workflow_dispatch: jobs: wordpress: From 8d7d13ef144c9b32083343028acff059cf0bb622 Mon Sep 17 00:00:00 2001 From: David Riccitelli Date: Wed, 10 Jul 2024 17:17:17 +0300 Subject: [PATCH 5/8] add support for 'workflow_dispatch' --- .github/workflows/publish-readme.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-readme.sh b/.github/workflows/publish-readme.sh index 34cc8598b..ade4c34fb 100755 --- a/.github/workflows/publish-readme.sh +++ b/.github/workflows/publish-readme.sh @@ -4,7 +4,7 @@ get_version() { grep -E '^ \* Version:\s+(\d+\.\d+\.\d+)$' src/wordlift.php | grep -oE '(\d+\.\d+\.\d+)$' } -if [[ 'src/readme.txt' == "$(git diff HEAD^ HEAD --name-only)" ]]; then +if [[ 'src/readme.txt' == "$(git diff HEAD^ HEAD --name-only)" || "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]]; then echo 'readme.txt has been updated, pushing...' version="$(get_version)" From fe656fe63592e3cce0b79762c9eeb6a19b51e382 Mon Sep 17 00:00:00 2001 From: David Riccitelli Date: Wed, 10 Jul 2024 17:25:05 +0300 Subject: [PATCH 6/8] update regex --- .github/workflows/publish-readme.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-readme.sh b/.github/workflows/publish-readme.sh index ade4c34fb..df1a7378e 100755 --- a/.github/workflows/publish-readme.sh +++ b/.github/workflows/publish-readme.sh @@ -1,13 +1,15 @@ #!/bin/bash get_version() { - grep -E '^ \* Version:\s+(\d+\.\d+\.\d+)$' src/wordlift.php | grep -oE '(\d+\.\d+\.\d+)$' + # This regex is crafted to work on ubuntu:22.04 which is the GH runner. + grep -P '^ \* Version:\s+(\d+\.\d+\.\d+)$' src/wordlift.php | grep -oP '(\d+\.\d+\.\d+)$' } if [[ 'src/readme.txt' == "$(git diff HEAD^ HEAD --name-only)" || "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]]; then echo 'readme.txt has been updated, pushing...' version="$(get_version)" + echo "** Using version $version" sed -i "s|^Stable tag: .*$|Stable tag: $version|g" src/readme.txt echo "** readme.txt new contents: " From 9608af033032c7d3ef3bdba920d59856e0cba014 Mon Sep 17 00:00:00 2001 From: David Riccitelli Date: Tue, 20 Aug 2024 15:20:48 +0300 Subject: [PATCH 7/8] ensure sanity --- .bin/create-zip-file.sh | 2 +- package.json | 2 +- src-js/webpack/package.json | 2 +- src/public/class-wordlift-term-jsonld-adapter.php | 4 ++-- src/readme.txt | 6 +++++- src/wordlift.php | 4 ++-- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.bin/create-zip-file.sh b/.bin/create-zip-file.sh index 5595dd43d..67ddea2e8 100755 --- a/.bin/create-zip-file.sh +++ b/.bin/create-zip-file.sh @@ -1,4 +1,4 @@ rm -fr wordlift wordlift-*.zip ; cp -R src wordlift -zip -r -9 wordlift-3.52.8.zip wordlift \ No newline at end of file +zip -r -9 wordlift-3.52.9.zip wordlift \ No newline at end of file diff --git a/package.json b/package.json index 14e4710ee..0d2b3bdcf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "wordlift-plugin", "description": "WordLift brings the power of Artificial Intelligence to organize content. Attract new readers and get their true attention with top notch semantic seo.", "private": true, - "version": "3.52.8", + "version": "3.52.9", "author": "WordLift", "homepage": "https://wordift.io/", "license": "GPL-3.0", diff --git a/src-js/webpack/package.json b/src-js/webpack/package.json index 335ca8b8b..8255b2abb 100644 --- a/src-js/webpack/package.json +++ b/src-js/webpack/package.json @@ -3,7 +3,7 @@ "engines": { "node": "12" }, - "version": "3.52.8", + "version": "3.52.9", "description": "WordLift Plugin application for the web site public front-end.", "main": "index.js", "repository": "https://github.com/insideout10/wordlift-plugin", diff --git a/src/public/class-wordlift-term-jsonld-adapter.php b/src/public/class-wordlift-term-jsonld-adapter.php index 84baf9a33..2dc756f9a 100644 --- a/src/public/class-wordlift-term-jsonld-adapter.php +++ b/src/public/class-wordlift-term-jsonld-adapter.php @@ -46,7 +46,7 @@ class Wordlift_Term_JsonLd_Adapter { * Wordlift_Term_JsonLd_Adapter constructor. * * @param \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance. - * @param \Wordlift_Post_Converter $post_id_to_jsonld_converter The {@link Wordlift_Post_Converter} instance. + * @param \Wordlift_Post_Converter $post_id_to_jsonld_converter The {@link Wordlift_Post_Converter} instance. * * @since 3.20.0 */ @@ -126,7 +126,7 @@ public function get_carousel_jsonld( $id = null ) { private function get_posts( $id ) { global $wp_query; - if ( $wp_query->posts !== null ) { + if ( is_array( $wp_query->posts ) ) { return array_map( function ( $post ) { return $post->ID; diff --git a/src/readme.txt b/src/readme.txt index e7155fc92..5d76e3839 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -6,7 +6,7 @@ Tags: SEO, structured data, ai, linked data, semantic web Requires at least: 5.3 Tested up to: 6.6 Requires PHP: 5.6 -Stable tag: 3.52.8 +Stable tag: 3.52.9 License: GPLv2 or later Search engines are looking for meaning, not keywords. WordLift tells Google how your content relates to your brand, products, and stakeholders. @@ -143,6 +143,10 @@ You can open your datasets to the public, attaching to it a free or a commercial == Changelog == += 3.52.9 (2024-08-20) = + +* Some plugins appear to hijack the ``$wp_query->posts` so we do more sanity checks to prevent fatal errors 💪 + = 3.52.8 (2024-06-11) = * Fix [#1737](https://github.com/insideout10/wordlift-plugin/issues/1737): Fixed garbled text after Block Editor reported the wrong text length in combination with some themes diff --git a/src/wordlift.php b/src/wordlift.php index 71c9db4d9..eac6be4fc 100644 --- a/src/wordlift.php +++ b/src/wordlift.php @@ -15,7 +15,7 @@ * Plugin Name: WordLift * Plugin URI: https://wordlift.io * Description: WordLift brings the power of AI to organize content, attract new readers and get their attention. To activate the plugin visit our website. - * Version: 3.52.8 + * Version: 3.52.9 * Author: WordLift * Author URI: https://wordlift.io * License: GPL-2.0+ @@ -32,7 +32,7 @@ use Wordlift\Post\Post_Adapter; define( 'WORDLIFT_PLUGIN_FILE', __FILE__ ); -define( 'WORDLIFT_VERSION', '3.52.8' ); +define( 'WORDLIFT_VERSION', '3.52.9' ); // ## DO NOT REMOVE THIS LINE: WHITELABEL PLACEHOLDER ## From 25c8bc8383db0056829bcc57e6604259f3acb8f3 Mon Sep 17 00:00:00 2001 From: David Riccitelli Date: Tue, 20 Aug 2024 15:20:52 +0300 Subject: [PATCH 8/8] ensure sanity --- src/public/class-wordlift-term-jsonld-adapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public/class-wordlift-term-jsonld-adapter.php b/src/public/class-wordlift-term-jsonld-adapter.php index 2dc756f9a..a6effb13e 100644 --- a/src/public/class-wordlift-term-jsonld-adapter.php +++ b/src/public/class-wordlift-term-jsonld-adapter.php @@ -46,7 +46,7 @@ class Wordlift_Term_JsonLd_Adapter { * Wordlift_Term_JsonLd_Adapter constructor. * * @param \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance. - * @param \Wordlift_Post_Converter $post_id_to_jsonld_converter The {@link Wordlift_Post_Converter} instance. + * @param \Wordlift_Post_Converter $post_id_to_jsonld_converter The {@link Wordlift_Post_Converter} instance. * * @since 3.20.0 */