diff --git a/.dev/assets/shared/js/frontend/vendor/responsive-nav.js b/.dev/assets/shared/js/frontend/vendor/responsive-nav.js index 8ec007b30..7c196d8c0 100644 --- a/.dev/assets/shared/js/frontend/vendor/responsive-nav.js +++ b/.dev/assets/shared/js/frontend/vendor/responsive-nav.js @@ -252,6 +252,12 @@ import debounce from "../utility/debounce"; if ( open_item && open_item.classList ) { open_item.classList.remove('submenu-is-open'); open_item.parentNode.classList.remove('child-has-focus'); + + // Set aria-expanded=false on the SVG element within this menu item + var svgElement = open_item.parentNode.querySelector( 'svg' ); + if ( svgElement ) { + svgElement.setAttribute( 'aria-expanded', 'false' ); + } } if ( open_item && open_item.parentNode && open_item.parentNode.querySelector( '.sub-menu' ) ) { @@ -276,6 +282,12 @@ import debounce from "../utility/debounce"; closed_item.classList.add( 'submenu-is-open' ); closed_item.parentNode.classList.add( 'child-has-focus' ); + // Set aria-expanded=true on the SVG element within this menu item + var svgElement = closed_item.parentNode.querySelector( 'svg' ); + if ( svgElement ) { + svgElement.setAttribute( 'aria-expanded', 'true' ); + } + if ( closed_item.parentNode.querySelector( '.sub-menu' ) ) { closed_item.parentNode.querySelector( '.sub-menu' ).setAttribute( 'aria-hidden', 'false' ); } @@ -296,9 +308,10 @@ import debounce from "../utility/debounce"; // Loop through all submenus and bind events when needed for ( i = 0; i < menu_items_with_children_count; i++ ) { - var svgElements = menu_items_with_children[i].querySelectorAll( 'svg' ); - for ( var q = 0; q < svgElements.length; q = q + 1 ) { - svgElements[q].addEventListener( 'click', listener_submenu_click ); + var svgElement = menu_items_with_children[i].querySelector( 'svg' ); + if ( svgElement ) { + svgElement.addEventListener( 'click', listener_submenu_click ); + svgElement.setAttribute( 'aria-expanded', 'false' ); } menu_items_with_children[i].removeEventListener( 'focusin', listener_submenu_focus ); } // for @@ -403,14 +416,13 @@ import debounce from "../utility/debounce"; if ( get_screen_size( 'has-offscreen-nav' ) || sub_menu_acion === 'click' ) { menu_items_with_children[i].addEventListener( 'click', listener_submenu_click ); - var svgElements = menu_items_with_children[i].querySelectorAll( 'svg' ); - - for ( var z = 0; z < svgElements.length; z = z + 1 ) { - - svgElements[z].addEventListener( 'click', listener_submenu_click ); - svgElements[z].addEventListener( 'keypress', ( e ) => { ['Space', 'Enter'].includes( e.code ) && listener_submenu_click( e ) } ); - svgElements[z].setAttribute( 'tabindex', '0' ); + var svgElement = menu_items_with_children[i].querySelector( 'svg' ); + if ( svgElement ) { + svgElement.addEventListener( 'click', listener_submenu_click ); + svgElement.addEventListener( 'keypress', ( e ) => { ['Space', 'Enter'].includes( e.code ) && listener_submenu_click( e ) } ); + svgElement.setAttribute( 'tabindex', '0' ); + svgElement.setAttribute( 'aria-expanded', 'false' ); } menu.classList.add( sub_menu_acion === 'click' ? 'uses-click' : 'uses-hover' ); diff --git a/.dev/tests/php/test-core.php b/.dev/tests/php/test-core.php index bbe9aa62c..25dd992d3 100644 --- a/.dev/tests/php/test-core.php +++ b/.dev/tests/php/test-core.php @@ -1165,7 +1165,7 @@ function testAddDropdownIcons() { $title = Go\Core\add_dropdown_icons( 'Title', $item, $args, 0 ); - $this->assertEquals( 'Title', trim( $title ) ); + $this->assertEquals( 'Title', trim( $title ) ); } diff --git a/.eslintrc.js b/.eslintrc.js index de5d1e88e..325b4a8e2 100755 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,12 +16,19 @@ module.exports = { 'react-dom': true, }, - parser: 'babel-eslint', + parser: '@babel/eslint-parser', + parserOptions: { + babelOptions: { + presets: [ '@babel/preset-env' ], + }, + requireConfigFile: false, + }, rules: { '@wordpress/no-global-active-element': 0, // because we are not using React, no need for this 'jsdoc/check-tag-names': [ 2, { definedTags: [ 'jest-environment' ], } ], + 'jsdoc/newline-after-description': 'off', // Rule doesn't exist in current eslint-plugin-jsdoc version }, }; diff --git a/.github/workflows/bump-woo-template-versions.yml b/.github/workflows/bump-woo-template-versions.yml index 9cecb897b..96a00984e 100644 --- a/.github/workflows/bump-woo-template-versions.yml +++ b/.github/workflows/bump-woo-template-versions.yml @@ -19,7 +19,7 @@ jobs: git config --global user.email "plugins@godaddy.com" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' diff --git a/.github/workflows/create-artifact.yml b/.github/workflows/create-artifact.yml index f543bcc89..8a353b6fc 100644 --- a/.github/workflows/create-artifact.yml +++ b/.github/workflows/create-artifact.yml @@ -28,7 +28,7 @@ jobs: ref: ${{ github.event.repository.default_branch }} - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 67516d081..893643950 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9d6ce0e92..da65a0ab4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' @@ -53,7 +53,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' @@ -80,7 +80,7 @@ jobs: themes: '["."]' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' @@ -123,7 +123,7 @@ jobs: themes: '["."]' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' diff --git a/.github/workflows/update-translations.yml b/.github/workflows/update-translations.yml index 1de5c7ca4..e6e19097a 100644 --- a/.github/workflows/update-translations.yml +++ b/.github/workflows/update-translations.yml @@ -22,7 +22,7 @@ jobs: git config --global user.email "plugins@godaddy.com" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' diff --git a/.github/workflows/validate-coding-standards.yml b/.github/workflows/validate-coding-standards.yml index 53438baf8..cd3a33baa 100644 --- a/.github/workflows/validate-coding-standards.yml +++ b/.github/workflows/validate-coding-standards.yml @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' @@ -46,7 +46,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' diff --git a/.nvmrc b/.nvmrc index 25bf17fc5..cabf43b5d 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18 \ No newline at end of file +24 \ No newline at end of file diff --git a/composer.json b/composer.json index b34df5ad8..335d04d53 100755 --- a/composer.json +++ b/composer.json @@ -45,13 +45,13 @@ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", "johnpbloch/wordpress-core": "^6.0.1", "phpcompatibility/phpcompatibility-wp": "^2.1", - "wp-coding-standards/wpcs": "^2.1", + "wp-coding-standards/wpcs": "^3.0", "phpunit/phpunit": "^9.5.21", "wp-phpunit/wp-phpunit": "^6.0.1", "yoast/phpunit-polyfills": "^1.1.0" }, "scripts": { - "lint": "@php ./vendor/bin/phpcs --standard=phpcs.xml --extensions=php --colors -s -p -v ./", + "lint": "@php ./vendor/bin/phpcs --standard=phpcs.xml --warning-severity=0 --extensions=php --colors -s -p -v ./", "test": "@php ./vendor/bin/phpunit", "install-phpunit": ".dev/deploy-scripts/local-install-wp-tests.sh wordpress_test root '' localhost latest" } diff --git a/composer.lock b/composer.lock index 97604f6e2..95fd7aa0d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a8b35d290ada146543def290333e6d6d", + "content-hash": "d6bcc2645f3ef974b9552afb449de701", "packages": [ { "name": "composer/installers", @@ -358,24 +358,24 @@ }, { "name": "johnpbloch/wordpress-core", - "version": "6.5.5", + "version": "6.8.2", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress-core.git", - "reference": "be6edfa018053533267a16e73f6623b0fa27b2df" + "reference": "316a8fe38b6dde4e4f399946809f040462038403" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/be6edfa018053533267a16e73f6623b0fa27b2df", - "reference": "be6edfa018053533267a16e73f6623b0fa27b2df", + "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/316a8fe38b6dde4e4f399946809f040462038403", + "reference": "316a8fe38b6dde4e4f399946809f040462038403", "shasum": "" }, "require": { "ext-json": "*", - "php": ">=7.0.0" + "php": ">=7.2.24" }, "provide": { - "wordpress/core-implementation": "6.5.5" + "wordpress/core-implementation": "6.8.2" }, "type": "wordpress-core", "notification-url": "https://packagist.org/downloads/", @@ -402,20 +402,20 @@ "source": "https://core.trac.wordpress.org/browser", "wiki": "https://codex.wordpress.org/" }, - "time": "2024-06-24T17:24:47+00:00" + "time": "2025-07-15T15:32:59+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.12.0", + "version": "1.13.3", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36", + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36", "shasum": "" }, "require": { @@ -454,7 +454,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.3" }, "funding": [ { @@ -462,20 +462,20 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2025-07-05T12:25:42+00:00" }, { "name": "nikic/php-parser", - "version": "v5.1.0", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", - "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9", + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9", "shasum": "" }, "require": { @@ -518,9 +518,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0" }, - "time": "2024-07-01T20:03:41+00:00" + "time": "2025-05-31T08:24:38+00:00" }, { "name": "phar-io/manifest", @@ -776,21 +776,22 @@ }, { "name": "phpcompatibility/phpcompatibility-wp", - "version": "2.1.5", + "version": "2.1.7", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", - "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082" + "reference": "5bfbbfbabb3df2b9a83e601de9153e4a7111962c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/01c1ff2704a58e46f0cb1ca9d06aee07b3589082", - "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/5bfbbfbabb3df2b9a83e601de9153e4a7111962c", + "reference": "5bfbbfbabb3df2b9a83e601de9153e4a7111962c", "shasum": "" }, "require": { "phpcompatibility/php-compatibility": "^9.0", - "phpcompatibility/phpcompatibility-paragonie": "^1.0" + "phpcompatibility/phpcompatibility-paragonie": "^1.0", + "squizlabs/php_codesniffer": "^3.3" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^1.0" @@ -840,41 +841,220 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcompatibility", + "type": "thanks_dev" + } + ], + "time": "2025-05-12T16:38:37+00:00" + }, + { + "name": "phpcsstandards/phpcsextra", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "fa4b8d051e278072928e32d817456a7fdb57b6ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/fa4b8d051e278072928e32d817456a7fdb57b6ca", + "reference": "fa4b8d051e278072928e32d817456a7fdb57b6ca", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.1.0", + "squizlabs/php_codesniffer": "^3.13.0 || ^4.0" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" + } + ], + "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSExtra" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-06-14T07:40:39+00:00" + }, + { + "name": "phpcsstandards/phpcsutils", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "65355670ac17c34cd235cf9d3ceae1b9252c4dad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/65355670ac17c34cd235cf9d3ceae1b9252c4dad", + "reference": "65355670ac17c34cd235cf9d3ceae1b9252c4dad", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.13.0 || ^4.0" + }, + "require-dev": { + "ext-filter": "*", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0 || ^3.0.0" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPCSUtils/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" + } + ], + "description": "A suite of utility functions for use with PHP_CodeSniffer", + "homepage": "https://phpcsutils.com/", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "phpcs3", + "phpcs4", + "standards", + "static analysis", + "tokens", + "utility" + ], + "support": { + "docs": "https://phpcsutils.com/", + "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSUtils" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2024-04-24T21:37:59+00:00" + "time": "2025-06-12T04:32:33+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -883,7 +1063,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -912,7 +1092,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -920,7 +1100,7 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1165,45 +1345,45 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.19", + "version": "9.6.23", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" + "reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", - "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/43d2cb18d0675c38bd44982a5d1d88f6d53d8d95", + "reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", + "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.13.1", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", "sebastian/version": "^3.0.2" }, "suggest": { @@ -1248,7 +1428,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.23" }, "funding": [ { @@ -1259,12 +1439,20 @@ "url": "https://github.com/sebastianbergmann", "type": "github" }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, { "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", "type": "tidelift" } ], - "time": "2024-04-05T04:35:58+00:00" + "time": "2025-05-02T06:40:34+00:00" }, { "name": "sebastian/cli-parser", @@ -2231,16 +2419,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.1", + "version": "3.13.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", - "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5b5e3821314f947dd040c70f7992a64eac89025c", + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c", "shasum": "" }, "require": { @@ -2305,9 +2493,13 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2024-05-22T21:24:41+00:00" + "time": "2025-06-17T22:17:01+00:00" }, { "name": "theseer/tokenizer", @@ -2361,30 +2553,38 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "2.3.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7da1894633f168fe244afc6de00d141f27517b62" + "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", - "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/9333efcbff231f10dfd9c56bb7b65818b4733ca7", + "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7", "shasum": "" }, "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" + "phpcsstandards/phpcsextra": "^1.2.1", + "phpcsstandards/phpcsutils": "^1.0.10", + "squizlabs/php_codesniffer": "^3.9.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.0", - "phpcsstandards/phpcsdevtools": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpcsstandards/phpcsdevtools": "^1.2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + "ext-iconv": "For improved results", + "ext-mbstring": "For improved results" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -2401,6 +2601,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -2408,20 +2609,26 @@ "source": "https://github.com/WordPress/WordPress-Coding-Standards", "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" }, - "time": "2020-05-13T23:57:56+00:00" + "funding": [ + { + "url": "https://opencollective.com/php_codesniffer", + "type": "custom" + } + ], + "time": "2024-03-25T16:39:00+00:00" }, { "name": "wp-phpunit/wp-phpunit", - "version": "6.5.5", + "version": "6.8.1", "source": { "type": "git", "url": "https://github.com/wp-phpunit/wp-phpunit.git", - "reference": "ef2cb44c0d991ac0c3a7a3ed0d2d1cf3fe8d8f2f" + "reference": "a33d328dab5a4a9ddf0c560bcadbabb58b5ee67f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/ef2cb44c0d991ac0c3a7a3ed0d2d1cf3fe8d8f2f", - "reference": "ef2cb44c0d991ac0c3a7a3ed0d2d1cf3fe8d8f2f", + "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/a33d328dab5a4a9ddf0c560bcadbabb58b5ee67f", + "reference": "a33d328dab5a4a9ddf0c560bcadbabb58b5ee67f", "shasum": "" }, "type": "library", @@ -2456,20 +2663,20 @@ "issues": "https://github.com/wp-phpunit/issues", "source": "https://github.com/wp-phpunit/wp-phpunit" }, - "time": "2024-05-07T16:46:52+00:00" + "time": "2025-04-16T01:40:54+00:00" }, { "name": "yoast/phpunit-polyfills", - "version": "1.1.1", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/Yoast/PHPUnit-Polyfills.git", - "reference": "a0f7d708794a738f328d7b6c94380fd1d6c40446" + "reference": "e6faedf5e34cea4438e341f660e2f719760c531d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/a0f7d708794a738f328d7b6c94380fd1d6c40446", - "reference": "a0f7d708794a738f328d7b6c94380fd1d6c40446", + "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/e6faedf5e34cea4438e341f660e2f719760c531d", + "reference": "e6faedf5e34cea4438e341f660e2f719760c531d", "shasum": "" }, "require": { @@ -2484,7 +2691,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-main": "4.x-dev" } }, "autoload": { @@ -2519,20 +2726,20 @@ "security": "https://github.com/Yoast/PHPUnit-Polyfills/security/policy", "source": "https://github.com/Yoast/PHPUnit-Polyfills" }, - "time": "2024-04-05T16:01:51+00:00" + "time": "2025-02-09T18:13:44+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=7.4" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "7.4" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/docs/design-styles/example/functions.php b/docs/design-styles/example/functions.php index 2b17be565..24e72949d 100755 --- a/docs/design-styles/example/functions.php +++ b/docs/design-styles/example/functions.php @@ -55,6 +55,5 @@ function prefix_get_available_design_styles( $default_design_styles ) { ); return $default_design_styles; - } add_filter( 'go_design_styles', 'prefix_get_available_design_styles' ); diff --git a/includes/amp.php b/includes/amp.php index 05b7d978f..58aadffd2 100644 --- a/includes/amp.php +++ b/includes/amp.php @@ -14,14 +14,13 @@ */ function setup() { - $n = function( $function ) { + $n = function ( $function ) { return __NAMESPACE__ . "\\$function"; }; add_filter( 'walker_nav_menu_start_el', $n( 'amp_nav_sub_menu_buttons' ), 10, 4 ); add_filter( 'body_class', $n( 'amp_body_class' ) ); - } /** @@ -42,7 +41,6 @@ function amp_body_class( $classes ) { $classes[] = 'amp'; return $classes; - } // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter -- Parameters are coming from a hook. @@ -69,7 +67,7 @@ function amp_nav_sub_menu_buttons( $item_output, $item, $depth, $args ) { $expanded = in_array( 'current-menu-ancestor', $item->classes, true ); static $nav_menu_item_number = 0; - $nav_menu_item_number++; + ++$nav_menu_item_number; $expanded_state_id = 'navMenuItemExpanded' . $nav_menu_item_number; $item_output .= sprintf( @@ -106,7 +104,6 @@ function amp_nav_sub_menu_buttons( $item_output, $item, $depth, $args ) { ); return $dropdown_button . $item_output; - } // phpcs:enable Generic.CodeAnalysis.UnusedFunctionParameter @@ -128,5 +125,4 @@ function is_amp() { * @var bool */ return (bool) apply_filters( 'go_is_amp', ( function_exists( 'amp_is_request' ) && amp_is_request() ) ); - } diff --git a/includes/classes/admin/class-go-theme-deactivation.php b/includes/classes/admin/class-go-theme-deactivation.php index 8fc81597b..9c62d2780 100644 --- a/includes/classes/admin/class-go-theme-deactivation.php +++ b/includes/classes/admin/class-go-theme-deactivation.php @@ -27,7 +27,6 @@ public function __construct() { add_action( 'admin_footer-themes.php', array( $this, 'admin_go_deactivation_modal' ) ); add_filter( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); - } /** @@ -135,7 +134,6 @@ public function enqueue_scripts( $hook_suffix ) { array( 'wp-components' ), GO_VERSION ); - } /** @@ -148,9 +146,7 @@ public function admin_go_deactivation_modal() {
array( 'label' => esc_html_x( 'Footer 1', 'name of the first footer variation option', 'go' ), 'preview_image' => get_theme_file_uri( 'dist/images/admin/footer-1.svg' ), - 'partial' => function() { + 'partial' => function () { return get_template_part( 'partials/footers/footer', '1' ); }, ), 'footer-2' => array( 'label' => esc_html_x( 'Footer 2', 'name of the second footer variation option', 'go' ), 'preview_image' => get_theme_file_uri( 'dist/images/admin/footer-2.svg' ), - 'partial' => function() { + 'partial' => function () { return get_template_part( 'partials/footers/footer', '2' ); }, ), 'footer-3' => array( 'label' => esc_html_x( 'Footer 3', 'name of the third footer variation option', 'go' ), 'preview_image' => get_theme_file_uri( 'dist/images/admin/footer-3.svg' ), - 'partial' => function() { + 'partial' => function () { return get_template_part( 'partials/footers/footer', '3' ); }, ), 'footer-4' => array( 'label' => esc_html_x( 'Footer 4', 'name of the fourth footer variation option', 'go' ), 'preview_image' => get_theme_file_uri( 'dist/images/admin/footer-4.svg' ), - 'partial' => function() { + 'partial' => function () { return get_template_part( 'partials/footers/footer', '4' ); }, ), @@ -1146,7 +1130,6 @@ function get_available_footer_variations() { $supported_footer_variations = (array) apply_filters( 'go_footer_variations', $default_footer_variations ); return $supported_footer_variations; - } /** @@ -1163,7 +1146,6 @@ function get_default_footer_variation() { * @param array $default_footer_variation The slug of the default footer variation. */ return (string) apply_filters( 'go_default_footer_variation', 'footer-1' ); - } /** @@ -1181,7 +1163,6 @@ function get_footer_variation() { } return false; - } /** @@ -1199,7 +1180,6 @@ function get_default_copyright() { */ /* translators: the theme author */ return (string) apply_filters( 'go_default_copyright', get_bloginfo( 'name' ) ); - } /** @@ -1282,7 +1262,6 @@ function get_available_social_icons() { * @see https://github.com/godaddy-wordpress/go/pull/870/files#diff-21e944aca0f42ff6529bde979b0fd787d00e010406e6642f947e71bf5e6f5ad1L1272-R1272 */ return (array) apply_filters( 'go_available_social_icons', apply_filters( 'go_avaliable_social_icons', $social_icons ) ); - } /** @@ -1298,7 +1277,6 @@ function get_social_icons() { } return $social_icons; - } /** @@ -1318,7 +1296,6 @@ function get_available_color_schemes() { * @param array $design_style The full design style object */ return (array) apply_filters( 'go_color_schemes', $design_style['color_schemes'], $design_style ); - } /** @@ -1333,7 +1310,6 @@ function get_default_color_scheme() { * @param array $default_color_scheme The slug of the default color scheme. */ return (string) apply_filters( 'go_default_color_scheme', 'one' ); - } /** @@ -1374,6 +1350,9 @@ function add_dropdown_icons( $title, $item, $args, $depth ) { $icon = ob_get_clean(); + // Add aria-label to the SVG for accessibility. + $icon = str_replace( '