Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 0 additions & 30 deletions .eslintignore

This file was deleted.

53 changes: 0 additions & 53 deletions .eslintrc.js

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- run: npm run lint:php
Expand All @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- run: npm run test:unit:php
Expand All @@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- name: Build distributable zip
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- run: npm run lint:php
Expand All @@ -44,7 +44,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- run: npm run lint:js
Expand All @@ -57,7 +57,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- run: npm run test:unit:php
Expand All @@ -69,7 +69,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- name: Build distributable zip
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- name: Download test zip artifact
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- name: Download test zip artifact
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm

- run: npm ci
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
ref: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- run: npm run lint:php
Expand All @@ -260,7 +260,7 @@ jobs:
ref: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- run: npm run test:unit:php
Expand All @@ -279,7 +279,7 @@ jobs:
ref: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: npm
- run: npm ci
- name: Download built artifact
Expand Down
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Write package-lock.json without "resolved" tarball URLs for registry packages,
# so the lockfile does not pin any particular registry host. "integrity" hashes
# are kept, so every install is still verified; tarballs come from whichever
# registry the installing machine is configured to use.
omit-lockfile-registry-resolved=true
4 changes: 3 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"no-duplicate-selectors": null,
"color-named": [ "never", { "ignore": [ "inside-function" ] } ],
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true
"scss/at-rule-no-unknown": true,
"property-no-deprecated": null,
"declaration-property-value-keyword-no-deprecated": null
}
}
5 changes: 4 additions & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"testsPort": 9190,
"plugins": [
"."
]
],
"mappings": {
"wp-content/mu-plugins": "./tests/e2e/functional/environment/mu-plugins"
}
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.4.2

- Security: Google Fonts used in global styles are now only downloaded from Google's own font servers, and only saved as WOFF2 font files; `http://` and protocol-relative Google Fonts links are upgraded to HTTPS and localised too
- Fixed: malformed font or style values in global styles, such as a numeric font weight or a font families value that is not a list, no longer cause a fatal error when updating global styles
- Fixed: Google Fonts saved locally now load on multisite subsites and on sites with a custom uploads location; previously the font file was saved in the right folder but linked from the wrong address, so it silently failed to load
- Fixed: updating global styles with Google Fonts no longer causes a fatal error on hosts where WordPress writes files over FTP or SSH, and fonts are now saved locally on hosts where only the uploads folder is writable
- Images can now be uploaded from addresses that do not end in a file extension, such as CDN and image-proxy links; previously these were refused before the image was even downloaded
- Updated development and build dependencies to clear security advisories in the toolchain; the compiled block bundle is rebuilt as a result
- Security: the post, page and media tools now check permission on each individual item, so users can only read or change content their WordPress role allows

## 0.4.1

- The download no longer carries test-only helper classes that were never used at runtime, making the plugin slightly smaller
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
|---|---|
| **Plugin name** | Airo WP AI Builder |
| **Text domain** | `airo-wp` |
| **Version** | 0.4.1 |
| **Version** | 0.4.2 |
| **Requires WordPress** | 6.9+ |
| **Requires PHP** | 7.4+ |
| **License** | [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html) |
Expand Down
4 changes: 2 additions & 2 deletions airo-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Airo WP AI Builder
* Plugin URI: https://github.com/godaddy-wordpress/airo-wp
* Description: MCP server and block pattern library for AI-powered site building.
* Version: 0.4.1
* Version: 0.4.2
* Requires at least: 6.9
* Requires PHP: 7.4
* Author: GoDaddy
Expand Down Expand Up @@ -47,7 +47,7 @@
defined( 'ABSPATH' ) || exit;

if ( ! defined( 'AIRO_WP_VERSION' ) ) {
define( 'AIRO_WP_VERSION', '0.4.1' );
define( 'AIRO_WP_VERSION', '0.4.2' );
}
if ( ! defined( 'AIRO_WP_PLUGIN_FILE' ) ) {
define( 'AIRO_WP_PLUGIN_FILE', __FILE__ );
Expand Down
64 changes: 64 additions & 0 deletions data/frontend-extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"block-animations": {
"needles": [ "has-airo-wp-animation", "data-airo-wp-animation-enabled", "data-airo-wp-svg-draw" ],
"attributes": [ "dsgoAnimationEnabled", "dsgoSvgDraw" ],
"scripts": [ "src/extensions/block-animations/frontend.js", "src/extensions/block-animations/svg-draw.js" ],
"style": "src/extensions/block-animations/animations.scss"
},
"background-video": {
"needles": [ "airo-wp-has-video-background" ],
"attributes": [ "dsgoVideoUrl" ],
"scripts": [ "src/extensions/background-video/frontend.js" ],
"style": "src/extensions/background-video/style.scss"
},
"clickable-group": {
"needles": [ "airo-wp-clickable" ],
"attributes": [ "dsgoLinkUrl" ],
"scripts": [ "src/extensions/clickable-group/frontend.js" ],
"style": "src/extensions/clickable-group/styles.scss"
},
"text-reveal": {
"needles": [ "has-airo-wp-text-reveal", "data-airo-wp-text-reveal-enabled" ],
"attributes": [ "dsgoTextRevealEnabled" ],
"scripts": [ "src/extensions/text-reveal/frontend.js" ],
"style": "src/extensions/text-reveal/style.scss"
},
"expanding-background": {
"needles": [ "has-airo-wp-expanding-background", "data-airo-wp-expanding-bg-enabled" ],
"attributes": [ "dsgoExpandingBgEnabled" ],
"scripts": [ "src/extensions/expanding-background/frontend.js" ],
"style": "src/extensions/expanding-background/style.scss"
},
"vertical-scroll-parallax": {
"needles": [ "data-airo-wp-parallax-enabled" ],
"attributes": [ "dsgoParallaxEnabled" ],
"scripts": [ "src/extensions/vertical-scroll-parallax/frontend.js" ]
},
"hover-effects": {
"needles": [ "airo-wp-hover-effect" ],
"style": "src/extensions/hover-effects/styles.scss"
},
"reveal-control": {
"needles": [ "airo-wp-has-reveal" ],
"attributes": [ "dsgoRevealOnHover" ],
"style": "src/extensions/reveal-control/styles.scss"
},
"svg-patterns": {
"needles": [ "has-airo-wp-svg-pattern" ],
"attributes": [ "dsgoSvgPatternEnabled" ],
"style": "src/extensions/svg-patterns/style.scss"
},
"grid-span": {
"needles": [ "airo-wp-grid__inner" ],
"style": "src/extensions/grid-span/style.scss"
},
"grid-mobile-order": {
"needles": [ "airo-wp-grid__inner" ],
"style": "src/extensions/grid-mobile-order/style.scss"
},
"interactions": {
"needles": [ "data-airo-wp-interactions" ],
"attributes": [ "dsgoInteractions" ],
"style": "src/extensions/interactions/style.scss"
}
}
10 changes: 5 additions & 5 deletions data/icon-svg-library.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function airowp_get_icon_aliases() {
return $aliases;
}

$file = dirname( dirname( __DIR__ ) ) . '/data/icon-aliases.json';
$file = __DIR__ . '/icon-aliases.json';

if ( ! file_exists( $file ) ) {
$aliases = array();
Expand Down Expand Up @@ -327,17 +327,17 @@ function airowp_accordion_render_icon( $icon_style, $is_open ) {
switch ( $icon_style ) {
case 'plus-minus':
if ( $is_open ) {
$icon_svg = '<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M4 8h8v1H4z" /></svg>';
$icon_svg = '<svg viewBox="0 0 16 16" fill="currentColor"><path d="M4 8h8v1H4z" /></svg>';
} else {
$icon_svg = '<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M8 4v8M4 8h8" stroke="currentColor" stroke-width="1" fill="none" /></svg>';
$icon_svg = '<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 4v8M4 8h8" stroke="currentColor" stroke-width="1" fill="none" /></svg>';
}
break;
case 'caret':
$icon_svg = '<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M6 7l2 2 2-2z" /></svg>';
$icon_svg = '<svg viewBox="0 0 16 16" fill="currentColor"><path d="M6 7l2 2 2-2z" /></svg>';
break;
case 'chevron':
default:
$icon_svg = '<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z" /></svg>';
$icon_svg = '<svg viewBox="0 0 16 16" fill="currentColor"><path d="M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z" /></svg>';
}

return '<span class="airo-wp-accordion-item__icon" aria-hidden="true">' . $icon_svg . '</span>';
Expand Down
Loading
Loading