Skip to content

Commit 140a55c

Browse files
authored
Merge pull request #443 from beyondwords-io/s-6737-wordpress-68-support
WordPress 6.8 support
2 parents 0cc05ba + bb332cc commit 140a55c

File tree

63 files changed

+4531
-3341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+4531
-3341
lines changed

.github/workflows/main.yml

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ jobs:
407407
run: cp -r .github/.wp-cli ~/
408408

409409
- name: Download WordPress
410-
run: wp core download --version=6.7
410+
run: wp core download --version=6.8
411411

412412
- name: Create `wp-config.php` file
413413
run: wp config create
@@ -445,25 +445,60 @@ jobs:
445445
cd /tmp
446446
zip -r Basic-Auth.zip Basic-Auth
447447
448-
- name: Install plugins
448+
- name: Uninstall plugins
449+
run: wp plugin uninstall --deactivate --all
450+
451+
- name: Install BeyondWords plugin
452+
run: wp plugin install /tmp/${{ vars.WP_ORG_PLUGIN_NAME }}.zip --force --activate
453+
454+
- name: Install third-party plugins
449455
run: |
450-
wp plugin uninstall --deactivate --all
451-
wp plugin install /tmp/${{ vars.WP_ORG_PLUGIN_NAME }}.zip --force --activate
452-
wp plugin install /tmp/Basic-Auth.zip --force --activate
453-
wp plugin install ${{ github.workspace }}/tests/fixtures/wp-content/plugins/beyondwords-filter-content-params.zip --force
454-
wp plugin install ${{ github.workspace }}/tests/fixtures/wp-content/plugins/beyondwords-filter-player-script-onload.zip --force
455-
wp plugin install ${{ github.workspace }}/tests/fixtures/wp-content/plugins/beyondwords-filter-player-inline-script-tag.zip --force
456-
wp plugin install ${{ github.workspace }}/tests/fixtures/wp-content/plugins/beyondwords-filter-player-sdk-params.zip --force
457-
wp plugin install ${{ github.workspace }}/tests/fixtures/wp-content/plugins/cpt-active.zip --force --activate
458-
wp plugin install ${{ github.workspace }}/tests/fixtures/wp-content/plugins/cpt-inactive.zip --force --activate
459-
wp plugin install ${{ github.workspace }}/tests/fixtures/wp-content/plugins/cpt-unsupported.zip --force --activate
460-
wp plugin install ${{ github.workspace }}/tests/fixtures/wp-content/plugins/rest-api-insert.zip --force
461-
wp plugin install ${{ github.workspace }}/tests/fixtures/wp-content/plugins/rest-api-publish.zip --force
462456
wp plugin install amp --force
463457
wp plugin install classic-editor --force
464458
wp plugin install plugin-check --force
465459
wp plugin install wp-graphql --force
466-
wp plugin install wp-reset --force
460+
wp plugin install wp-reset --force --activate
461+
wp plugin install /tmp/Basic-Auth.zip --force --activate
462+
463+
- name: Package and install standalone plugin PHP files
464+
run: |
465+
set -e
466+
467+
# Directory with plugin files
468+
PLUGIN_SRC_DIR="${{ github.workspace }}/tests/fixtures/wp-content/plugins"
469+
470+
# Create temporary directory for zips
471+
TEMP_ZIP_DIR="/tmp/plugin-zips"
472+
mkdir -p "$TEMP_ZIP_DIR"
473+
474+
for plugin_php in "$PLUGIN_SRC_DIR"/*.php; do
475+
# Extract base name without extension
476+
plugin_basename=$(basename "$plugin_php" .php)
477+
478+
# Create a directory structure expected by WordPress
479+
plugin_dir="$TEMP_ZIP_DIR/$plugin_basename"
480+
mkdir -p "$plugin_dir"
481+
482+
# Copy the PHP file into that directory and rename to match directory
483+
cp "$plugin_php" "${plugin_dir}/{$plugin_basename}.php"
484+
485+
# Zip the directory
486+
(cd "$TEMP_ZIP_DIR" && zip -r "${plugin_basename}.zip" "$plugin_basename")
487+
488+
# Debugging
489+
pwd
490+
ls -la "$plugin_dir"
491+
ls -la "$TEMP_ZIP_DIR"
492+
493+
# Install plugin
494+
wp plugin install "$TEMP_ZIP_DIR/${plugin_basename}.zip" --force
495+
done
496+
497+
- name: Activate selected standalone plugins
498+
run: |
499+
wp plugin activate cpt-active
500+
wp plugin activate cpt-inactive
501+
wp plugin activate cpt-unsupported
467502
468503
- run: wp plugin list
469504

.mockoon/beyondwords-api.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@
712712
},
713713
{
714714
"uuid": "67b759fa-5a0f-41af-81b8-58e7a12db32d",
715-
"body": "{\n \"enabled\": true,\n \"player_version\": \"1\",\n \"player_style\": \"standard\",\n \"player_title\": \"G B 7118 Amy, Brian\",\n \"call_to_action\": \"Listen to this article\",\n \"image_url\": \"\",\n \"theme\": \"light\",\n \"dark_theme\": {\n \"background_color\": \"TRANSPARENT\",\n \"icon_color\": \"#FFF\",\n \"text_color\": \"#FFF\",\n \"highlight_color\": \"#444\"\n },\n \"light_theme\": {\n \"background_color\": \"#F5F5F5\",\n \"icon_color\": \"#000\",\n \"text_color\": \"#111\",\n \"highlight_color\": \"#EEE\"\n },\n \"video_theme\": {\n \"background_color\": \"#F5F5F5\",\n \"icon_color\": \"#000\",\n \"text_color\": \"#111\"\n },\n \"title_enabled\": false,\n \"image_enabled\": true,\n \"persistent_ad_image\": false,\n \"widget_style\": \"standard\",\n \"widget_position\": \"auto\",\n \"segment_playback_enabled\": true,\n \"skip_button_style\": \"auto\",\n \"intros_outros\": [],\n \"intro_url\": null,\n \"outro_url\": null,\n \"intro_outro_enabled\": false,\n \"paywall_type\": \"none\",\n \"paywall_url\": null,\n \"download_button_enabled\": false,\n \"share_button_enabled\": false,\n \"voice_icon_enabled\": false,\n \"logo_icon_enabled\": true,\n \"analytics_enabled\": true,\n \"analytics_uuid_enabled\": true,\n \"analytics_url\": \"https://metrics.beyondwords.io/events\",\n \"analytics_id\": 3814,\n \"analytics_tag_enabled\": false,\n \"analytics_tag\": null,\n \"analytics_custom_url\": null,\n \"updated\": \"2023-06-22T12:16:11Z\"\n}",
715+
"body": "{\n \"enabled\": true,\n \"player_version\": \"1\",\n \"player_style\": \"standard\",\n \"player_title\": \"G B 7118 Amy, Brian\",\n \"call_to_action\": \"Listen to this article\",\n \"image_url\": \"\",\n \"theme\": \"light\",\n \"dark_theme\": {\n \"background_color\": \"transparent\",\n \"icon_color\": \"#fff\",\n \"text_color\": \"#fff\",\n \"highlight_color\": \"#444\"\n },\n \"light_theme\": {\n \"background_color\": \"#f5f5f5\",\n \"icon_color\": \"#000\",\n \"text_color\": \"#111\",\n \"highlight_color\": \"#eee\"\n },\n \"video_theme\": {\n \"background_color\": \"#f5f5f5\",\n \"icon_color\": \"#000\",\n \"text_color\": \"#111\"\n },\n \"title_enabled\": false,\n \"image_enabled\": true,\n \"persistent_ad_image\": false,\n \"widget_style\": \"standard\",\n \"widget_position\": \"auto\",\n \"segment_playback_enabled\": true,\n \"skip_button_style\": \"auto\",\n \"intros_outros\": [],\n \"intro_url\": null,\n \"outro_url\": null,\n \"intro_outro_enabled\": false,\n \"paywall_type\": \"none\",\n \"paywall_url\": null,\n \"download_button_enabled\": false,\n \"share_button_enabled\": false,\n \"voice_icon_enabled\": false,\n \"logo_icon_enabled\": true,\n \"analytics_enabled\": true,\n \"analytics_uuid_enabled\": true,\n \"analytics_url\": \"https://metrics.beyondwords.io/events\",\n \"analytics_id\": 3814,\n \"analytics_tag_enabled\": false,\n \"analytics_tag\": null,\n \"analytics_custom_url\": null,\n \"updated\": \"2023-06-22T12:16:11Z\"\n}",
716716
"latency": 0,
717717
"statusCode": 200,
718718
"label": "OK",
@@ -850,7 +850,7 @@
850850
},
851851
{
852852
"uuid": "03a49052-d373-4fbf-a69f-048712fffe9b",
853-
"body": "{\n \"enabled\": \"{{body 'enabled' true}}\",\n \"player_version\": \"{{body 'player_version' '1'}}\",\n \"player_style\": \"{{body 'player_style' 'standard'}}\",\n \"player_title\": \"{{body 'player_title' 'G B 7118 Amy, Brian'}}\",\n \"call_to_action\": \"{{body 'call_to_action' 'Listen to this article'}}\",\n \"image_url\": \"{{body 'image_url' 'image_url'}}\",\n \"theme\": \"{{body 'theme' 'light'}}\",\n \"dark_theme\": {\n \"text_color\": \"{{body 'dark_theme.text_color' '#FFF'}}\",\n \"background_color\": \"{{body 'dark_theme.background_color' 'TRANSPARENT'}}\",\n \"icon_color\": \"{{body 'dark_theme.icon_color' '#FFF'}}\",\n \"highlight_color\": \"{{body 'dark_theme.highlight_color' '#444'}}\",\n },\n \"light_theme\": {\n \"text_color\": \"{{body 'light_theme.text_color' '#111'}}\",\n \"background_color\": \"{{body 'light_theme.background_color' '#F5F5F5'}}\",\n \"icon_color\": \"{{body 'light_theme.icon_color' '#000'}}\",\n \"highlight_color\": \"{{body 'light_theme.highlight_color' '#EEE'}}\",\n },\n \"video_theme\": {\n \"text_color\": \"{{body 'video_theme.text_color' '#111'}}\",\n \"background_color\": \"{{body 'video_theme.background_color' '#F5F5F5'}}\",\n \"icon_color\": \"{{body 'video_theme.icon_color' '#000'}}\",\n },\n \"title_enabled\": \"{{body 'title_enabled' false}}\",\n \"image_enabled\": \"{{body 'image_enabled' true}}\",\n \"persistent_ad_image\": \"{{body 'persistent_ad_image' false}}\",\n \"widget_style\": \"{{body 'widget_style' 'standard'}}\",\n \"widget_position\": \"{{body 'widget_position' 'auto'}}\",\n \"segment_playback_enabled\": \"{{body 'segment_playback_enabled' true}}\",\n \"skip_button_style\": \"{{body 'skip_button_style' 'auto'}}\",\n \"intros_outros\":\"{{body 'intro_url' []}}\",\n \"intro_url\": \"{{body 'intro_url' null}}\",\n \"outro_url\": \"{{body 'outro_url' null}}\",\n \"intro_outro_enabled\": \"{{body 'intro_outro_enabled' false}}\",\n \"paywall_type\": \"{{body 'paywall_type' 'none'}}\",\n \"paywall_url\": \"{{body 'paywall_url' null}}\",\n \"download_button_enabled\": \"{{body 'download_button_enabled' false}}\",\n \"share_button_enabled\": \"{{body 'share_button_enabled' false}}\",\n \"voice_icon_enabled\": \"{{body 'voice_icon_enabled' false}}\",\n \"logo_icon_enabled\": \"{{body 'logo_icon_enabled' true}}\",\n \"analytics_enabled\": \"{{body 'analytics_enabled' true}}\",\n \"analytics_uuid_enabled\": \"{{body 'analytics_uuid_enabled' true}}\",\n \"analytics_url\": \"{{body 'analytics_url' 'https://metrics.beyondwords.io/events'}}\",\n \"analytics_id\": \"{{body 'analytics_id' 3814}}\",\n \"analytics_tag_enabled\": \"{{body 'analytics_tag_enabled' false}}\",\n \"analytics_tag\": \"{{body 'analytics_tag' null}}\",\n \"analytics_custom_url\": \"{{body 'analytics_custom_url' null}}\",\n \"updated\": \"2023-06-22T12:16:11Z\"\n}",
853+
"body": "{\n \"enabled\": \"{{body 'enabled' true}}\",\n \"player_version\": \"{{body 'player_version' '1'}}\",\n \"player_style\": \"{{body 'player_style' 'standard'}}\",\n \"player_title\": \"{{body 'player_title' 'G B 7118 Amy, Brian'}}\",\n \"call_to_action\": \"{{body 'call_to_action' 'Listen to this article'}}\",\n \"image_url\": \"{{body 'image_url' 'image_url'}}\",\n \"theme\": \"{{body 'theme' 'light'}}\",\n \"dark_theme\": {\n \"text_color\": \"{{body 'dark_theme.text_color' '#fff'}}\",\n \"background_color\": \"{{body 'dark_theme.background_color' 'transparent'}}\",\n \"icon_color\": \"{{body 'dark_theme.icon_color' '#fff'}}\",\n \"highlight_color\": \"{{body 'dark_theme.highlight_color' '#444'}}\",\n },\n \"light_theme\": {\n \"text_color\": \"{{body 'light_theme.text_color' '#111'}}\",\n \"background_color\": \"{{body 'light_theme.background_color' '#f5f5f5'}}\",\n \"icon_color\": \"{{body 'light_theme.icon_color' '#000'}}\",\n \"highlight_color\": \"{{body 'light_theme.highlight_color' '#eee'}}\",\n },\n \"video_theme\": {\n \"text_color\": \"{{body 'video_theme.text_color' '#111'}}\",\n \"background_color\": \"{{body 'video_theme.background_color' '#f5f5f5'}}\",\n \"icon_color\": \"{{body 'video_theme.icon_color' '#000'}}\",\n },\n \"title_enabled\": \"{{body 'title_enabled' false}}\",\n \"image_enabled\": \"{{body 'image_enabled' true}}\",\n \"persistent_ad_image\": \"{{body 'persistent_ad_image' false}}\",\n \"widget_style\": \"{{body 'widget_style' 'standard'}}\",\n \"widget_position\": \"{{body 'widget_position' 'auto'}}\",\n \"segment_playback_enabled\": \"{{body 'segment_playback_enabled' true}}\",\n \"skip_button_style\": \"{{body 'skip_button_style' 'auto'}}\",\n \"intros_outros\":\"{{body 'intro_url' []}}\",\n \"intro_url\": \"{{body 'intro_url' null}}\",\n \"outro_url\": \"{{body 'outro_url' null}}\",\n \"intro_outro_enabled\": \"{{body 'intro_outro_enabled' false}}\",\n \"paywall_type\": \"{{body 'paywall_type' 'none'}}\",\n \"paywall_url\": \"{{body 'paywall_url' null}}\",\n \"download_button_enabled\": \"{{body 'download_button_enabled' false}}\",\n \"share_button_enabled\": \"{{body 'share_button_enabled' false}}\",\n \"voice_icon_enabled\": \"{{body 'voice_icon_enabled' false}}\",\n \"logo_icon_enabled\": \"{{body 'logo_icon_enabled' true}}\",\n \"analytics_enabled\": \"{{body 'analytics_enabled' true}}\",\n \"analytics_uuid_enabled\": \"{{body 'analytics_uuid_enabled' true}}\",\n \"analytics_url\": \"{{body 'analytics_url' 'https://metrics.beyondwords.io/events'}}\",\n \"analytics_id\": \"{{body 'analytics_id' 3814}}\",\n \"analytics_tag_enabled\": \"{{body 'analytics_tag_enabled' false}}\",\n \"analytics_tag\": \"{{body 'analytics_tag' null}}\",\n \"analytics_custom_url\": \"{{body 'analytics_custom_url' null}}\",\n \"updated\": \"2023-06-22T12:16:11Z\"\n}",
854854
"latency": 0,
855855
"statusCode": 200,
856856
"label": "OK",

.wp-env.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
2-
"core": "WordPress/WordPress#6.7",
2+
"core": "WordPress/WordPress#6.8",
33
"phpVersion": "8.4",
44
"plugins": [
5+
"./",
56
"WP-API/Basic-Auth",
6-
"./tests/fixtures/wp-content/plugins/cpt-active",
7-
"./tests/fixtures/wp-content/plugins/cpt-inactive",
8-
"./tests/fixtures/wp-content/plugins/cpt-unsupported",
9-
"./"
7+
"https://downloads.wordpress.org/plugin/wordpress-importer.zip"
108
],
119
"config": {
1210
"AUTOMATIC_UPDATER_DISABLED": true,
@@ -19,18 +17,13 @@
1917
},
2018
"mappings": {
2119
"wp-content/debug.log": "./log/debug.log",
20+
"wp-content/plugins": "./tests/fixtures/wp-content/plugins",
2221
"wp-content/plugins/amp": "https://downloads.wordpress.org/plugin/amp.zip",
2322
"wp-content/plugins/classic-editor": "https://downloads.wordpress.org/plugin/classic-editor.zip",
24-
"wp-content/plugins/beyondwords-filter-content-params": "./tests/fixtures/wp-content/plugins/beyondwords-filter-content-params",
25-
"wp-content/plugins/beyondwords-filter-player-script-onload": "./tests/fixtures/wp-content/plugins/beyondwords-filter-player-script-onload",
26-
"wp-content/plugins/beyondwords-filter-player-inline-script-tag": "./tests/fixtures/wp-content/plugins/beyondwords-filter-player-inline-script-tag",
27-
"wp-content/plugins/beyondwords-filter-player-sdk-params": "./tests/fixtures/wp-content/plugins/beyondwords-filter-player-sdk-params",
2823
"wp-content/plugins/query-monitor": "https://downloads.wordpress.org/plugin/query-monitor.zip",
2924
"wp-content/plugins/plugin-check": "https://downloads.wordpress.org/plugin/plugin-check.zip",
30-
"wp-content/plugins/rest-api-insert": "./tests/fixtures/wp-content/plugins/rest-api-insert",
31-
"wp-content/plugins/rest-api-publish": "./tests/fixtures/wp-content/plugins/rest-api-publish",
32-
"wp-content/plugins/wp-graphql": "https://downloads.wordpress.org/plugin/wp-graphql.zip",
33-
"wp-content/plugins/wp-reset": "https://downloads.wordpress.org/plugin/wp-reset.zip"
25+
"wp-content/plugins/wp-reset": "https://downloads.wordpress.org/plugin/wp-reset.zip",
26+
"wp-content/plugins/wp-graphql": "https://downloads.wordpress.org/plugin/wp-graphql.zip"
3427
},
3528
"env": {
3629
"tests": {

.wp-env.override.json.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"core": "WordPress/WordPress#6.7",
32
"config": {
43
"BEYONDWORDS_TESTS_API_KEY": "write_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
54
"BEYONDWORDS_TESTS_CONTENT_ID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
"@wordpress/eslint-plugin": "^22.2.0",
1818
"@wordpress/scripts": "^30.9.0",
1919
"badge-maker": "^4.1.0",
20-
"cypress": "14.2.0",
20+
"cypress": "14.3.3",
2121
"cypress-fail-fast": "^7.1.1",
2222
"cypress-map": "^1.45.0",
2323
"cypress-multi-reporters": "^2.0.5",
2424
"cypress-terminal-report": "^7.1.0",
2525
"dotenv": "^16.4.7",
26+
"lodash": "^4.17.21",
2627
"mochawesome": "^7.1.3",
2728
"uuid": "^11.0.5"
2829
},

src/Component/Post/AddPlayer/AddPlayer.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
height: 60px;
88
line-height: 60px;
99
font-size: 60px;
10-
background-color: #F5F5F5;
10+
background-color: #f5f5f5;
1111
border: 1px dashed #000000;
1212
position: relative;
1313
}

src/Component/Settings/Fields/PlayerColors/PlayerColors.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ public function addPlayerColorsSetting()
109109
self::OPTION_NAME_LIGHT_THEME,
110110
[
111111
'default' => [
112-
'background_color' => '#F5F5F5',
112+
'background_color' => '#f5f5f5',
113113
'icon_color' => '#000',
114114
'text_color' => '#111',
115-
'highlight_color' => '#EEE',
115+
'highlight_color' => '#eee',
116116
],
117117
'sanitize_callback' => array($this, 'sanitizeColorsArray'),
118118
]
@@ -123,10 +123,10 @@ public function addPlayerColorsSetting()
123123
self::OPTION_NAME_DARK_THEME,
124124
[
125125
'default' => [
126-
'background_color' => '#F5F5F5',
126+
'background_color' => '#f5f5f5',
127127
'icon_color' => '#000',
128128
'text_color' => '#111',
129-
'highlight_color' => '#EEE',
129+
'highlight_color' => '#eee',
130130
],
131131
'sanitize_callback' => array($this, 'sanitizeColorsArray'),
132132
]
@@ -138,8 +138,8 @@ public function addPlayerColorsSetting()
138138
[
139139
'default' => [
140140
'background_color' => '#000',
141-
'icon_color' => '#FFF',
142-
'text_color' => '#FFF',
141+
'icon_color' => '#fff',
142+
'text_color' => '#fff',
143143
],
144144
'sanitize_callback' => array($this, 'sanitizeColorsArray'),
145145
]

0 commit comments

Comments
 (0)