Skip to content

Commit 0f426d9

Browse files
authored
Merge pull request #7 from BeAPI/release/1.1.0
Release 1.1.0
2 parents 125844b + d4553f0 commit 0f426d9

11 files changed

Lines changed: 146 additions & 25 deletions

.plugin-data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"version": "1.0.2",
2+
"version": "1.1.0",
33
"slug": "blockparty-iframe"
44
}

CHANGELOG.md

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,73 @@ All notable changes to this project will be documented in this file.
77
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
and this project adheres to [Semantic Versioning](https://semver.org/).
99

10-
## [1.0.0] - 2025-01-09
10+
## [1.1.0] - 2026-01-12
11+
12+
### 🚀 Added
13+
14+
#### Iframe Code Parsing
15+
16+
- **HTML iframe code support**: You can now paste complete iframe HTML code instead of just URLs
17+
- **Automatic URL extraction**: The `src` attribute is automatically extracted from iframe code
18+
- **Auto-fill title**: The `title` attribute is automatically extracted and fills the title field
19+
- **Custom attributes preservation**: All custom iframe attributes are extracted and preserved in the final output
20+
- **Smart content filtering**: HTML content inside iframe tags is automatically removed during parsing
21+
22+
#### Attribute Management
23+
24+
- **Custom attributes storage**: New `iframeAttributes` block attribute (array of key-value objects)
25+
- **Boolean attributes support**: Proper handling of HTML boolean attributes like `allowfullscreen`
26+
- **React prop mapping**: Automatic conversion of HTML attributes to React prop names
27+
- `allowfullscreen``allowFullScreen`
28+
- `allowpaymentrequest``allowPaymentRequest`
29+
- `referrerpolicy``referrerPolicy`
30+
- **Deprecated attributes filtering**: Automatic exclusion of deprecated HTML attributes
31+
- `frameborder`, `marginwidth`, `marginheight`, `scrolling`, `align`, `longdesc`
32+
- **Problematic attributes filtering**: Exclusion of attributes that cause issues in React
33+
- `style` (requires object format in React)
34+
- `name` (can cause conflicts)
35+
- `width`, `height` (managed by block dimension supports)
36+
37+
#### Code Quality
38+
39+
- **Utility functions**: New `utils.js` module for shared functionality
40+
- **Code refactoring**: Eliminated duplication between `edit.js` and `save.js`
41+
- **Better error handling**: Improved parsing with `insertAdjacentHTML` for safer DOM manipulation
42+
43+
### 🔧 Changed
44+
45+
- **Source field enhancement**: The URL field now accepts both URLs and iframe HTML code
46+
- **Placeholder text**: Updated to reflect dual input capability
47+
- **Help text**: Added contextual help explaining the new paste functionality
48+
49+
### 📚 Technical Details
50+
51+
- **New file**: `src/blockparty-iframe/utils.js` with exported utility functions:
52+
- `parseIframeCode()`: Parse iframe HTML and extract attributes
53+
- `convertAttributesToProps()`: Convert attributes array to React props
54+
- `mapHtmlAttributeToReact()`: Map HTML attribute names to React prop names
55+
- `isBooleanAttribute()`: Identify boolean HTML attributes
56+
- `isExcludedIframeAttribute()`: Filter out problematic attributes
57+
58+
---
59+
60+
## [1.0.2] - 2026-01-10
61+
62+
### 🔧 Changed
63+
64+
- **Release workflow**: Updated GitHub Actions release workflow configuration
65+
66+
---
67+
68+
## [1.0.1] - 2026-01-09
69+
70+
### 🐛 Fixed
71+
72+
- **Build artifacts**: Updated `.distignore` and `.gitattributes` for proper release packaging
73+
74+
---
75+
76+
## [1.0.0] - 2026-01-09
1177

1278
### 🎉 Initial Release
1379

@@ -59,4 +125,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
59125

60126
---
61127

128+
[1.1.0]: https://github.com/BeAPI/blockparty-iframe/releases/tag/1.1.0
129+
[1.0.2]: https://github.com/BeAPI/blockparty-iframe/releases/tag/1.0.2
130+
[1.0.1]: https://github.com/BeAPI/blockparty-iframe/releases/tag/1.0.1
62131
[1.0.0]: https://github.com/BeAPI/blockparty-iframe/releases/tag/1.0.0

blockparty-iframe.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: Blockparty Iframe
44
* Description: Add a block to display an embedded frame in the WordPress editor.
5-
* Version: 1.0.2
5+
* Version: 1.1.0
66
* Requires at least: 6.7
77
* Requires PHP: 8.1
88
* Author: Be API Technical team
@@ -19,7 +19,7 @@
1919
exit; // Exit if accessed directly.
2020
}
2121

22-
define( 'BLOCKPARTY_IFRAME_VERSION', '1.0.2' );
22+
define( 'BLOCKPARTY_IFRAME_VERSION', '1.1.0' );
2323
define( 'BLOCKPARTY_IFRAME_URL', plugin_dir_url( __FILE__ ) );
2424
define( 'BLOCKPARTY_IFRAME_DIR', plugin_dir_path( __FILE__ ) );
2525
define( 'BLOCKPARTY_IFRAME_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );

composer.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation-revision-date":"2025-12-24 15:10+0100","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-iframe\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Replace":["Remplacer"],"View":["Voir"],"Settings":["R\u00e9glages"],"Enable lazyloading":["Activer le chargement diff\u00e9r\u00e9"],"Iframe":["Cadre"],"Fill the URL and the title of the iframe.":["Veuillez saisir une URL et un titre pour le cadre."],"URL":["URL"],"The URL is invalid.":["L\u2019URL n\u2019est pas valide."],"Title":["Titre"],"The title of the iframe is used for accessibility purposes and it will only be visible to screen readers.":["Le titre du cadre est utilis\u00e9 \u00e0 des fins d\u2019accessibilit\u00e9 et sera uniquement visible pour les technologies d\u2019assistance."],"Add iframe":["Ajouter le cadre"]}}}
1+
{"translation-revision-date":"2026-01-12 11:32+0100","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-iframe\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Replace":["Remplacer"],"View":["Voir"],"Settings":["R\u00e9glages"],"Enable lazyloading":["Activer le chargement diff\u00e9r\u00e9"],"Iframe":["Cadre"],"Fill the iframe source and the title of the iframe.":["Veuillez remplir la source du cadre ainsi que son titre."],"Source":["Source"],"You can either paste a URL or the iframe code.":["Vous pouvez soit renseigner une URL soit le code HTML du cadre."],"Title":["Titre"],"The title of the iframe is used for accessibility purposes and it will only be visible to screen readers.":["Le titre du cadre est utilis\u00e9 \u00e0 des fins d\u2019accessibilit\u00e9 et ne sera visible que par les technologies d\u2019assistance."],"Add iframe":["Ajouter un cadre"]}}}
836 Bytes
Binary file not shown.

languages/blockparty-iframe-fr_FR.po

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: Blockparty Iframe 1.0.0\n"
4-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-iframe\n"
4+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-"
5+
"iframe\n"
6+
"POT-Creation-Date: 2026-01-12T10:29:55+00:00\n"
7+
"PO-Revision-Date: 2026-01-12 11:32+0100\n"
58
"Last-Translator: \n"
69
"Language-Team: \n"
10+
"Language: fr_FR\n"
711
"MIME-Version: 1.0\n"
812
"Content-Type: text/plain; charset=UTF-8\n"
913
"Content-Transfer-Encoding: 8bit\n"
10-
"POT-Creation-Date: 2025-12-24T14:09:32+00:00\n"
11-
"PO-Revision-Date: 2025-12-24 15:10+0100\n"
12-
"Language: fr_FR\n"
1314
"X-Generator: Poedit 3.8\n"
1415
"X-Domain: blockparty-iframe\n"
1516

@@ -21,13 +22,62 @@ msgstr "Blockparty Cadre"
2122
#. Description of the plugin
2223
#: blockparty-iframe.php
2324
msgid "Add a block to display an embedded frame in the WordPress editor."
24-
msgstr "Ajoute un bloc pour afficher un cadre intégré dans l’éditeur WordPress."
25+
msgstr ""
26+
"Ajoute un bloc pour afficher un cadre intégré dans l’éditeur WordPress."
2527

2628
#. Author of the plugin
2729
#: blockparty-iframe.php
2830
msgid "Be API Technical team"
2931
msgstr "L’ équipe technique de Be API"
3032

33+
#: build/blockparty-iframe/index.js:1
34+
msgid "Replace"
35+
msgstr "Remplacer"
36+
37+
#: build/blockparty-iframe/index.js:1
38+
msgid "View"
39+
msgstr "Voir"
40+
41+
#: build/blockparty-iframe/index.js:1
42+
msgid "Settings"
43+
msgstr "Réglages"
44+
45+
#: build/blockparty-iframe/index.js:1
46+
msgid "Enable lazyloading"
47+
msgstr "Activer le chargement différé"
48+
49+
#: build/blockparty-iframe/index.js:1
50+
msgid "Iframe"
51+
msgstr "Cadre"
52+
53+
#: build/blockparty-iframe/index.js:1
54+
msgid "Fill the iframe source and the title of the iframe."
55+
msgstr "Veuillez remplir la source du cadre ainsi que son titre."
56+
57+
#: build/blockparty-iframe/index.js:1
58+
msgid "Source"
59+
msgstr "Source"
60+
61+
#: build/blockparty-iframe/index.js:1
62+
msgid "You can either paste a URL or the iframe code."
63+
msgstr "Vous pouvez soit renseigner une URL soit le code HTML du cadre."
64+
65+
#: build/blockparty-iframe/index.js:1
66+
msgid "Title"
67+
msgstr "Titre"
68+
69+
#: build/blockparty-iframe/index.js:1
70+
msgid ""
71+
"The title of the iframe is used for accessibility purposes and it will only "
72+
"be visible to screen readers."
73+
msgstr ""
74+
"Le titre du cadre est utilisé à des fins d’accessibilité et ne sera visible "
75+
"que par les technologies d’assistance."
76+
77+
#: build/blockparty-iframe/index.js:1
78+
msgid "Add iframe"
79+
msgstr "Ajouter un cadre"
80+
3181
#: build/blockparty-iframe/block.json
3282
msgctxt "block title"
3383
msgid "Iframe"

languages/blockparty-iframe.pot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Copyright (C) 2025 Be API Technical team
1+
# Copyright (C) 2026 Be API Technical team
22
# This file is distributed under the GPL-2.0-or-later.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Blockparty Iframe 1.0.0\n"
5+
"Project-Id-Version: Blockparty Iframe 1.1.0\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-iframe\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <LL@li.org>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2025-12-24T14:09:32+00:00\n"
12+
"POT-Creation-Date: 2026-01-12T10:29:55+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.11.0\n"
1515
"X-Domain: blockparty-iframe\n"
@@ -50,15 +50,15 @@ msgid "Iframe"
5050
msgstr ""
5151

5252
#: build/blockparty-iframe/index.js:1
53-
msgid "Fill the URL and the title of the iframe."
53+
msgid "Fill the iframe source and the title of the iframe."
5454
msgstr ""
5555

5656
#: build/blockparty-iframe/index.js:1
57-
msgid "URL"
57+
msgid "Source"
5858
msgstr ""
5959

6060
#: build/blockparty-iframe/index.js:1
61-
msgid "The URL is invalid."
61+
msgid "You can either paste a URL or the iframe code."
6262
msgstr ""
6363

6464
#: build/blockparty-iframe/index.js:1

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blockparty-iframe",
3-
"version": "1.0.2",
3+
"version": "1.1.0",
44
"description": "Add a block to display an embedded frame in the WordPress editor.",
55
"author": "Be API Technical team",
66
"license": "GPL-2.0-or-later",
@@ -12,6 +12,8 @@
1212
"lint:js": "wp-scripts lint-js",
1313
"packages-update": "wp-scripts packages-update",
1414
"plugin-zip": "wp-scripts plugin-zip",
15+
"make-pot": "wp i18n make-pot . languages/blockparty-iframe.pot --exclude=\"src\" --domain=blockparty-iframe",
16+
"make-json": "wp i18n make-json languages/blockparty-iframe-fr_FR.po languages/ --no-purge",
1517
"start": "wp-scripts start --blocks-manifest",
1618
"start:env": "wp-env start --config=./wp-env.json",
1719
"stop:env": "wp-env stop --config=./wp-env.json"

0 commit comments

Comments
 (0)