From 387bfb62ff7d833ec13b948540b6e37b677caa70 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 11:01:28 +0530 Subject: [PATCH 01/39] updated phpcs workflow file --- .github/workflows/ci.yml | 71 +++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9a5d5fd7..373aae5e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,47 +1,66 @@ -name: CI +name: Code Analysis on: pull_request +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: - CI: - runs-on: ubuntu-latest - + analysis: + runs-on: self-hosted + strategy: matrix: - node: [ 14.15 ] + node: ['14.17'] php: ['7.4'] - + steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v2 + + - name: Use desired version of NodeJS + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + + - name: Cache NPM packages + uses: actions/cache@v2 + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }} - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} coverage: none - tools: composer - - - name: Install composer dependencies - run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress + tools: composer, cs2pr, phpcs - - name: PHPCS check + - name: Install dependencies + run: composer install --prefer-dist --no-suggest --no-progress && npm install + + - name: Run phpcs + id: phpcs if: always() - uses: chekalsky/phpcs-action@v1 - with: - phpcs_bin_path: './vendor/bin/phpcs' - - - name: Use desired version of NodeJS - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - cache: 'npm' + run: ./vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml - - name: npm install - run: npm ci + - name: Show PHPCS results in PR + if: ${{ always() && steps.phpcs.outcome == 'failure' }} + run: cs2pr ./phpcs-report.xml - - name: Build project - run: npm run build + - name: Prettier Check + if: always() + run: npm run pretty - name: Lint JS - run: npm run lint:js + if: always() + run: npm run lint-js + + - name: Lint CSS + if: always() + run: npm run lint-css From b6d8e8a7e074eefd56d82468fa4d05dd563e1bd7 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 11:10:20 +0530 Subject: [PATCH 02/39] updated phpcs workflow file 2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 373aae5e1..31aae6b3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ concurrency: jobs: analysis: - runs-on: self-hosted + runs-on: ubuntu-latest strategy: matrix: From 6a3238849643e5afbd5e32bb06a7aa10a6a84637 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 11:18:08 +0530 Subject: [PATCH 03/39] updated phpcs workflow file 3 --- .github/workflows/ci.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31aae6b3a..be495ad98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,20 +15,20 @@ jobs: strategy: matrix: - node: ['14.17'] - php: ['7.4'] + node: [ 14.17 ] + php: ['7.4', '8.1'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Use desired version of NodeJS - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - name: Cache NPM packages - uses: actions/cache@v2 + uses: actions/cache@v4 with: # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm @@ -39,10 +39,13 @@ jobs: with: php-version: ${{ matrix.php }} coverage: none - tools: composer, cs2pr, phpcs + tools: composer, cs2pr - - name: Install dependencies - run: composer install --prefer-dist --no-suggest --no-progress && npm install + - name: Install npm dependencies + run: npm install + + - name: Install composer dependencies + run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress - name: Run phpcs id: phpcs @@ -53,9 +56,9 @@ jobs: if: ${{ always() && steps.phpcs.outcome == 'failure' }} run: cs2pr ./phpcs-report.xml - - name: Prettier Check + - name: PHP static analysis if: always() - run: npm run pretty + run: composer run phpstan - name: Lint JS if: always() From fda26690f6effe3f407d5beffad828be986224a4 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 11:32:01 +0530 Subject: [PATCH 04/39] updated composer --- composer.lock | 177 ++++++++++++--------- inc/lib/nps-survey/changelog.txt | 5 + inc/lib/nps-survey/dist/main.asset.php | 2 +- inc/lib/nps-survey/dist/main.js | 5 +- inc/lib/nps-survey/dist/style-main-rtl.css | 11 +- inc/lib/nps-survey/dist/style-main.css | 11 +- inc/lib/nps-survey/nps-survey.php | 4 +- inc/lib/nps-survey/version.json | 2 +- 8 files changed, 131 insertions(+), 86 deletions(-) diff --git a/composer.lock b/composer.lock index 7209b1b3c..f69a06f61 100644 --- a/composer.lock +++ b/composer.lock @@ -103,16 +103,16 @@ }, { "name": "brainstormforce/nps-survey", - "version": "1.0.14", + "version": "1.0.15", "source": { "type": "git", "url": "git@github.com:brainstormforce/nps-survey.git", - "reference": "32935e3385bf262b1b55583e15345eec29c8f1d5" + "reference": "1913008e235779e65ba4e2be6a46d3f46c7fa60f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brainstormforce/nps-survey/zipball/32935e3385bf262b1b55583e15345eec29c8f1d5", - "reference": "32935e3385bf262b1b55583e15345eec29c8f1d5", + "url": "https://api.github.com/repos/brainstormforce/nps-survey/zipball/1913008e235779e65ba4e2be6a46d3f46c7fa60f", + "reference": "1913008e235779e65ba4e2be6a46d3f46c7fa60f", "shasum": "" }, "require-dev": { @@ -156,10 +156,10 @@ }, "description": "NPS Survey Plugin", "support": { - "source": "https://github.com/brainstormforce/nps-survey/tree/1.0.14", + "source": "https://github.com/brainstormforce/nps-survey/tree/1.0.15", "issues": "https://github.com/brainstormforce/nps-survey/issues" }, - "time": "2025-08-18T12:36:33+00:00" + "time": "2025-09-11T05:30:33+00:00" }, { "name": "composer/installers", @@ -814,16 +814,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.28", + "version": "1.12.29", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "fcf8b71aeab4e1a1131d1783cef97b23a51b87a9" + "reference": "0835c625a38ac6484f050077116b6668bc3ab57d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/fcf8b71aeab4e1a1131d1783cef97b23a51b87a9", - "reference": "fcf8b71aeab4e1a1131d1783cef97b23a51b87a9", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0835c625a38ac6484f050077116b6668bc3ab57d", + "reference": "0835c625a38ac6484f050077116b6668bc3ab57d", "shasum": "" }, "require": { @@ -868,7 +868,7 @@ "type": "github" } ], - "time": "2025-07-17T17:15:39+00:00" + "time": "2025-09-16T08:46:57+00:00" }, { "name": "psr/container", @@ -982,16 +982,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.2", + "version": "3.13.4", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "5b5e3821314f947dd040c70f7992a64eac89025c" + "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5b5e3821314f947dd040c70f7992a64eac89025c", - "reference": "5b5e3821314f947dd040c70f7992a64eac89025c", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ad545ea9c1b7d270ce0fc9cbfb884161cd706119", + "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119", "shasum": "" }, "require": { @@ -1062,51 +1062,51 @@ "type": "thanks_dev" } ], - "time": "2025-06-17T22:17:01+00:00" + "time": "2025-09-05T05:47:09+00:00" }, { "name": "symfony/console", - "version": "v7.3.2", + "version": "v6.4.25", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1" + "reference": "273fd29ff30ba0a88ca5fb83f7cf1ab69306adae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5f360ebc65c55265a74d23d7fe27f957870158a1", - "reference": "5f360ebc65c55265a74d23d7fe27f957870158a1", + "url": "https://api.github.com/repos/symfony/console/zipball/273fd29ff30ba0a88ca5fb83f7cf1ab69306adae", + "reference": "273fd29ff30ba0a88ca5fb83f7cf1ab69306adae", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^7.2" + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/event-dispatcher": "<6.4", - "symfony/lock": "<6.4", - "symfony/process": "<6.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1140,7 +1140,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.2" + "source": "https://github.com/symfony/console/tree/v6.4.25" }, "funding": [ { @@ -1160,7 +1160,7 @@ "type": "tidelift" } ], - "time": "2025-07-30T17:13:41+00:00" + "time": "2025-08-22T10:21:53+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1231,25 +1231,25 @@ }, { "name": "symfony/filesystem", - "version": "v7.3.2", + "version": "v6.4.24", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" + "reference": "75ae2edb7cdcc0c53766c30b0a2512b8df574bd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/75ae2edb7cdcc0c53766c30b0a2512b8df574bd8", + "reference": "75ae2edb7cdcc0c53766c30b0a2512b8df574bd8", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^6.4|^7.0" + "symfony/process": "^5.4|^6.4|^7.0" }, "type": "library", "autoload": { @@ -1277,7 +1277,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" + "source": "https://github.com/symfony/filesystem/tree/v6.4.24" }, "funding": [ { @@ -1297,27 +1297,27 @@ "type": "tidelift" } ], - "time": "2025-07-07T08:17:47+00:00" + "time": "2025-07-10T08:14:14+00:00" }, { "name": "symfony/finder", - "version": "v7.3.2", + "version": "v6.4.24", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" + "reference": "73089124388c8510efb8d2d1689285d285937b08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", + "url": "https://api.github.com/repos/symfony/finder/zipball/73089124388c8510efb8d2d1689285d285937b08", + "reference": "73089124388c8510efb8d2d1689285d285937b08", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.1" }, "require-dev": { - "symfony/filesystem": "^6.4|^7.0" + "symfony/filesystem": "^6.0|^7.0" }, "type": "library", "autoload": { @@ -1345,7 +1345,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.2" + "source": "https://github.com/symfony/finder/tree/v6.4.24" }, "funding": [ { @@ -1365,11 +1365,11 @@ "type": "tidelift" } ], - "time": "2025-07-15T13:41:35+00:00" + "time": "2025-07-15T12:02:45+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -1428,7 +1428,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" }, "funding": [ { @@ -1439,6 +1439,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -1448,16 +1452,16 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", "shasum": "" }, "require": { @@ -1506,7 +1510,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" }, "funding": [ { @@ -1517,16 +1521,20 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-06-27T09:58:17+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -1587,7 +1595,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" }, "funding": [ { @@ -1598,6 +1606,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -1607,7 +1619,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -1668,7 +1680,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" }, "funding": [ { @@ -1679,6 +1691,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -1688,7 +1704,7 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", @@ -1744,7 +1760,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.33.0" }, "funding": [ { @@ -1755,6 +1771,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -1847,20 +1867,20 @@ }, { "name": "symfony/string", - "version": "v7.3.2", + "version": "v6.4.25", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca" + "reference": "7cdec7edfaf2cdd9c18901e35bcf9653d6209ff1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/42f505aff654e62ac7ac2ce21033818297ca89ca", - "reference": "42f505aff654e62ac7ac2ce21033818297ca89ca", + "url": "https://api.github.com/repos/symfony/string/zipball/7cdec7edfaf2cdd9c18901e35bcf9653d6209ff1", + "reference": "7cdec7edfaf2cdd9c18901e35bcf9653d6209ff1", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -1870,12 +1890,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/emoji": "^7.1", - "symfony/error-handler": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/var-exporter": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1914,7 +1933,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.2" + "source": "https://github.com/symfony/string/tree/v6.4.25" }, "funding": [ { @@ -1934,7 +1953,7 @@ "type": "tidelift" } ], - "time": "2025-07-10T08:47:49+00:00" + "time": "2025-08-22T12:33:20+00:00" }, { "name": "szepeviktor/phpstan-wordpress", diff --git a/inc/lib/nps-survey/changelog.txt b/inc/lib/nps-survey/changelog.txt index 60b6caa1c..412bba1f7 100644 --- a/inc/lib/nps-survey/changelog.txt +++ b/inc/lib/nps-survey/changelog.txt @@ -1,3 +1,8 @@ +Version 1.0.15 - 11-09-2025 +- New: + - Added `privacy_policy` option with configurable link and custom content. + - Added `popup.placement` option to customize popup position. + Version 1.0.14 - 18-08-2025 - Improvement: - Added `rating_min_label` and `rating_max_label` text options for customizable rating labels. diff --git a/inc/lib/nps-survey/dist/main.asset.php b/inc/lib/nps-survey/dist/main.asset.php index 3aab71f54..5b9261061 100644 --- a/inc/lib/nps-survey/dist/main.asset.php +++ b/inc/lib/nps-survey/dist/main.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '24399096f39e4ad5d954'); + array('react', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '747a09817c61fd382747'); diff --git a/inc/lib/nps-survey/dist/main.js b/inc/lib/nps-survey/dist/main.js index ed7d68b52..a9f66c19a 100644 --- a/inc/lib/nps-survey/dist/main.js +++ b/inc/lib/nps-survey/dist/main.js @@ -1 +1,4 @@ -(()=>{"use strict";var e,t={45:(e,t,r)=>{var o=r(609);const n=window.wp.element,s=e=>{let t;const r=new Set,o=(e,o)=>{const n="function"==typeof e?e(t):e;if(!Object.is(n,t)){const e=t;t=(null!=o?o:"object"!=typeof n||null===n)?n:Object.assign({},t,n),r.forEach((r=>r(t,e)))}},n=()=>t,s={setState:o,getState:n,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(o,n,s);return s};var a=r(79);const{useDebugValue:l}=o,{useSyncExternalStoreWithSelector:i}=a;let c=!1;const d=e=>e,u=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?s(e):s)(e):e,r=(e,r)=>function(e,t=d,r){r&&!c&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),c=!0);const o=i(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return l(o),o}(t,e,r);return Object.assign(r,t),r},p="SET_CURRENT_STEP",m="SET_NPS_RATING",b="SET_SHOW_NPS",f=document.querySelectorAll('[data-id^="nps-survey-"]'),g={};Array.from(f).forEach((e=>{const t=JSON.parse(e.getAttribute("data-vars"));t.npsId=e.dataset.id,g[t.npsId]={showNps:t?.show_if,currentStep:"plugin-rating"===t?.nps_status?.dismiss_step?"plugin-rating":"nps-rating",npsRating:null,npsId:t.npsId}}));const h=(G=(e,{type:t,payload:r,npsId:o})=>{switch(t){case b:return{...e,[o]:{...e[o],showNps:r}};case p:return{...e,[o]:{...e[o],currentStep:r}};case m:return{...e,[o]:{...e[o],npsRating:r}};default:return e}},A=g,(R=(e,t,r)=>(r.dispatch=t=>(e((e=>G(e,t)),!1,t),t),r.dispatchFromDevtools=!0,{dispatch:(...e)=>r.dispatch(...e),...A}))?u(R):u),y=({children:e})=>(0,o.createElement)("p",{className:"mt-1 mx-0 mb-0 text-base leading-6 font-normal text-zip-body-text"},e),v=({children:e})=>(0,o.createElement)("h3",{className:"my-0 text-lg font-bold leading-7 text-zip-app-heading"},e),x=window.wp.i18n,w=function(e){const{allow_review:t=!1,message:{logo:r,plugin_name:s,nps_rating_title:a,nps_rating_message:l,rating_min_label:i,rating_max_label:c},npsId:d}=e,{dispatch:u}=h(),p=Array.from({length:10},((e,t)=>t+1)),[m,b]=(0,n.useState)(null);return(0,o.createElement)("div",null,(0,o.createElement)("div",{className:"flex items-center justify-start gap-2"},(0,o.createElement)("img",{className:"size-6",src:r,alt:"Brand Logo"}),(0,o.createElement)(v,null,a||s)),(0,o.createElement)(y,null,l.replaceAll("#pluginname",s)),(0,o.createElement)("div",{className:"mt-5"},(0,o.createElement)("span",{className:"isolate inline-flex gap-2 w-full"},p.map((e=>(0,o.createElement)("button",{type:"button",key:e,onClick:()=>async function(e){null===m&&(b(e),u({npsId:d,type:"SET_NPS_RATING",payload:e}),u(t&&e>=8?{npsId:d,type:"SET_CURRENT_STEP",payload:"plugin-rating"}:{npsId:d,type:"SET_CURRENT_STEP",payload:"comment"}))}(e),className:"relative flex-1 inline-flex items-center justify-center bg-white py-1.5 text-sm font-medium text-nps-button-text hover:bg-gray-50 focus:z-10 border border-solid border-button-disabled rounded-md transition-colors ease-in-out duration-150 hover:cursor-pointer"},e))))),(0,o.createElement)("div",{className:"mt-3 flex items-center justify-between"},(0,o.createElement)("span",{className:"text-secondary-text text-xs font-medium leading-5"},i||(0,x.__)("Very unlikely","nps-survey")),(0,o.createElement)("span",{className:"text-secondary-text text-xs font-medium leading-5"},c||(0,x.__)("Very likely","nps-survey"))))},E=e=>{const t=N(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),k(r,t)||_(e)},getConflictingClassGroupIds:(e,t)=>{const n=r[e]||[];return t&&o[e]?[...n,...o[e]]:n}}},k=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?k(e.slice(1),o):void 0;if(n)return n;if(0===t.validators.length)return;const s=e.join("-");return t.validators.find((({validator:e})=>e(s)))?.classGroupId},S=/^\[(.+)\]$/,_=e=>{if(S.test(e)){const t=S.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},N=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return j(Object.entries(e.classGroups),r).forEach((([e,r])=>{z(r,o,e,t)})),o},z=(e,t,r,o)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return C(e)?void z(e(o),t,r,o):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach((([e,n])=>{z(n,I(t,e),r,o)}))}else(""===e?t:I(t,e)).classGroupId=r}))},I=(e,t)=>{let r=e;return t.split("-").forEach((e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)})),r},C=e=>e.isThemeGetter,j=(e,t)=>t?e.map((([e,r])=>[e,r.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,r])=>[t+e,r]))):e))])):e,P=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(n,s)=>{r.set(n,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(n(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):n(e,t)}}},T=e=>{const{separator:t,experimentalParseClassName:r}=e,o=1===t.length,n=t[0],s=t.length,a=e=>{const r=[];let a,l=0,i=0;for(let c=0;ci?a-i:void 0}};return r?e=>r({className:e,parseClassName:a}):a},O=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach((e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)})),t.push(...r.sort()),t};var R,G,A;function M(){let e,t,r=0,o="";for(;r{if("string"==typeof e)return e;let t,r="";for(let o=0;ot(e)),e());return r=(e=>({cache:P(e.cacheSize),parseClassName:T(e),...E(e)}))(i),o=r.cache.get,n=r.cache.set,s=a,a(l)};function a(e){const t=o(e);if(t)return t;const s=((e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,s=[];let a="";for(let t=e.length-1;t>=0;){for(;" "===e[t];)--t;const l=e.lastIndexOf(" ",t),i=e.slice(-1===l?0:l+1,t+1);t=l;const{modifiers:c,hasImportantModifier:d,baseClassName:u,maybePostfixModifierPosition:p}=r(i);let m=Boolean(p),b=o(m?u.substring(0,p):u);if(!b){if(!m){a=i+(a.length>0?" "+a:a);continue}if(b=o(u),!b){a=i+(a.length>0?" "+a:a);continue}m=!1}const f=O(c).join(":"),g=d?f+"!":f,h=g+b;if(s.includes(h))continue;s.push(h);const y=n(b,m);for(let e=0;e0?" "+a:a)}return a})(e,r);return n(e,s),s}return function(){return s(M.apply(null,arguments))}}const B=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},L=/^\[(?:([a-z-]+):)?(.+)\]$/i,V=/^\d+\/\d+$/,$=new Set(["px","full","screen"]),q=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,H=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,U=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,J=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X=e=>K(e)||$.has(e)||V.test(e),Z=e=>de(e,"length",ue),K=e=>Boolean(e)&&!Number.isNaN(Number(e)),Q=e=>de(e,"number",K),Y=e=>Boolean(e)&&Number.isInteger(Number(e)),ee=e=>e.endsWith("%")&&K(e.slice(0,-1)),te=e=>L.test(e),re=e=>q.test(e),oe=new Set(["length","size","percentage"]),ne=e=>de(e,oe,pe),se=e=>de(e,"position",pe),ae=new Set(["image","url"]),le=e=>de(e,ae,be),ie=e=>de(e,"",me),ce=()=>!0,de=(e,t,r)=>{const o=L.exec(e);return!!o&&(o[1]?"string"==typeof t?o[1]===t:t.has(o[1]):r(o[2]))},ue=e=>F.test(e)&&!H.test(e),pe=()=>!1,me=e=>U.test(e),be=e=>J.test(e),fe=D((Symbol.toStringTag,()=>{const e=B("colors"),t=B("spacing"),r=B("blur"),o=B("brightness"),n=B("borderColor"),s=B("borderRadius"),a=B("borderSpacing"),l=B("borderWidth"),i=B("contrast"),c=B("grayscale"),d=B("hueRotate"),u=B("invert"),p=B("gap"),m=B("gradientColorStops"),b=B("gradientColorStopPositions"),f=B("inset"),g=B("margin"),h=B("opacity"),y=B("padding"),v=B("saturate"),x=B("scale"),w=B("sepia"),E=B("skew"),k=B("space"),S=B("translate"),_=()=>["auto",te,t],N=()=>[te,t],z=()=>["",X,Z],I=()=>["auto",K,te],C=()=>["","0",te],j=()=>[K,te];return{cacheSize:500,separator:":",theme:{colors:[ce],spacing:[X,Z],blur:["none","",re,te],brightness:j(),borderColor:[e],borderRadius:["none","","full",re,te],borderSpacing:N(),borderWidth:z(),contrast:j(),grayscale:C(),hueRotate:j(),invert:C(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[ee,Z],inset:_(),margin:_(),opacity:j(),padding:N(),saturate:j(),scale:j(),sepia:C(),skew:j(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[re]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",te]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Y,te]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",Y,te]}],"grid-cols":[{"grid-cols":[ce]}],"col-start-end":[{col:["auto",{span:["full",Y,te]},te]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ce]}],"row-start-end":[{row:["auto",{span:[Y,te]},te]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[re]},re]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",re,Z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Q]}],"font-family":[{font:[ce]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",te]}],"line-clamp":[{"line-clamp":["none",K,Q]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",X,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",X,Z]}],"underline-offset":[{"underline-offset":["auto",X,te]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",se]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ne]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},le]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[X,te]}],"outline-w":[{outline:[X,Z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[X,Z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",re,ie]}],"shadow-color":[{shadow:[ce]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",re,te]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[v]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Y,te]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",te]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[X,Z,Q]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function ge(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;tfe(function(){for(var e,t,r=0,o="",n=arguments.length;r{t.preventDefault(),o||r({npsId:e,type:"SET_CURRENT_STEP",payload:"nps-rating"})},ke=(0,n.forwardRef)((({variant:e="primary",hasSuffixIcon:t=!1,hasPrefixIcon:r=!1,type:n="button",className:s,onClick:a,children:l,disabled:i=!1,id:c="",size:d="medium",...u},p)=>{const m={base:{default:"px-6 py-3",hasPrefixIcon:"pl-4 pr-6 py-3",hasSuffixIcon:"pl-6 pr-4 py-3"},medium:{default:"px-4 py-3 h-11",hasPrefixIcon:"pl-4 pr-6 py-3",hasSuffixIcon:"pl-6 pr-4 py-3"},small:{default:"px-5 py-2 h-[2.625rem]",hasPrefixIcon:"pl-3 pr-5 py-2 h-[2.625rem]",hasSuffixIcon:"pl-5 pr-3 py-2 h-[2.625rem]"}};return(0,o.createElement)("button",{type:n,className:ve("group flex items-center justify-center gap-2 rounded-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 transition duration-150 ease-in-out cursor-pointer border-0",{primary:"text-white bg-nps-button-background border border-solid border-nps-button-background",secondary:"text-zip-body-text bg-white border border-solid border-zip-body-text",dark:"text-white border border-white bg-transparent border-solid",link:"text-border-secondary underline border-0 bg-transparent",blank:"bg-transparent border-transparent"}[e],!r&&!t&&m[d].default,r&&m[d].hasPrefixIcon,t&&m[d].hasSuffixIcon,{base:"text-base font-medium",medium:"text-base font-medium",small:"text-sm font-medium"}[d],{base:"rounded-md",medium:"rounded-md",small:"rounded"}[d],i&&"cursor-not-allowed opacity-70",s),onClick:e=>{a&&"function"==typeof a&&a(e)},ref:p,disabled:i,...c&&{id:c},...u},l)})),Se=({className:e=""})=>(0,o.createElement)("svg",{className:ve("animate-spin size-5 text-white",e),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,o.createElement)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,o.createElement)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}));function _e({title:e,titleId:t,...r},n){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M17 10a.75.75 0 0 1-.75.75H5.612l4.158 3.96a.75.75 0 1 1-1.04 1.08l-5.5-5.25a.75.75 0 0 1 0-1.08l5.5-5.25a.75.75 0 1 1 1.04 1.08L5.612 9.25H16.25A.75.75 0 0 1 17 10Z",clipRule:"evenodd"}))}const Ne=o.forwardRef(_e),ze=function(e){const{message:{feedback_title:t,feedback_content:r,plugin_rating_title:s,plugin_rating_content:a},plugin_slug:l,npsId:i}=e,[c,d]=(0,n.useState)(""),u=h((e=>e)),{npsRating:p}=u[i],[m,b]=(0,n.useState)(!1),{dispatch:f}=h(),g=p>=8;return(0,o.createElement)("div",null,(0,o.createElement)("div",{className:"flex justify-between"},(0,o.createElement)(v,null,g?t:s)),(0,o.createElement)(y,null,g?r:a),(0,o.createElement)("div",{className:"mt-5"},(0,o.createElement)("form",{onSubmit:async function(e){e.preventDefault(),m||we(i,p,c,"",f,b,l)}},(0,o.createElement)("div",{className:"mt-2"},(0,o.createElement)("textarea",{rows:4,cols:65,name:"comment",id:"comment",className:"block w-full rounded-md py-1.5 text-zip-body-text shadow-sm border border-border-nps-primary border-solid placeholder:text-nps-placeholder-text focus:ring-1 focus:ring-nps-button-background sm:text-sm sm:leading-6",value:c,onChange:e=>{d(e.target.value)}})),(0,o.createElement)("div",{className:"mt-3 flex justify-between"},(0,o.createElement)(ke,{className:"relative border-none py-2 px-4 pl-0 font-semibold bg-transparent text-nps-button-background",variant:"primary",onClick:e=>Ee(i,e,f,m),size:"small"},(0,o.createElement)(Ne,{className:"w-4"}),(0,x.__)("Back","nps-survey")),(0,o.createElement)(ke,{className:"relative py-2 px-4 font-semibold hover:text-white",variant:"primary",type:"submit",size:"small"},m&&(0,o.createElement)("span",{className:"absolute inset-0 inline-flex items-center justify-center"},(0,o.createElement)(Se,null)),(0,o.createElement)("span",{className:ve(m&&"invisible")},(0,x.__)("Submit","nps-survey")))))))},Ie=function(e){const{message:{feedback_title:t,feedback_content:r,plugin_rating_link:n,plugin_rating_button_string:s},dismiss_timespan:a,plugin_slug:l,npsId:i}=e,c=h((e=>e)),{currentStep:d,npsRating:u}=c[i],[p,m]=(0,o.useState)(!1),{dispatch:b}=h(),f=async function(e=!0){we(i,u,"","plugin-rating",b,m,l),xe(i,b,d,a,l),e&&window.open(n,"_blank")};return(0,o.createElement)("div",{className:ve(p&&"opacity-50 cursor-progress")},(0,o.createElement)("div",{className:"flex justify-between"},(0,o.createElement)(v,null,t)),(0,o.createElement)(y,null,r),(0,o.createElement)("div",{className:"flex justify-between mt-5"},(0,o.createElement)(ke,{className:"relative border-none py-2 px-4 pl-0 font-semibold bg-transparent text-nps-button-background",variant:"primary",onClick:e=>Ee(i,e,b),size:"small"},(0,o.createElement)(Ne,{className:"w-4"}),(0,x.__)("Back","nps-survey")),(0,o.createElement)("div",{className:"flex justify-start"},(0,o.createElement)(ke,{variant:"link",className:"py-2 px-4 no-underline font-normal",type:"button",onClick:()=>f(!1),size:"small"},(0,x.__)("I already did!","nps-survey")),(0,o.createElement)(ke,{variant:"primary",className:"py-2 px-4 font-semibold hover:text-white",type:"button",onClick:f,size:"small"},s||(0,x.__)("Rate the Plugin","nps-survey")))))};function Ce({title:e,titleId:t,...r},n){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?o.createElement("title",{id:t},e):null,o.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const je=o.forwardRef(Ce),Pe=()=>{const e=window.innerWidth,t={xs:512,sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const r in t)if(e<=t[r])return r},Te=e=>{const{plugin_slug:t,dismiss_timespan:r,npsId:n,npsIndex:s,show_overlay:a=!1}=e,l=h((e=>e)),{dispatch:i}=h(),{showNps:c,currentStep:d,npsRating:u}=l[n],[p,m]=(0,o.useState)(!1),[b,f]=(0,o.useState)(Pe());if((0,o.useEffect)((()=>{const e=()=>{f(Pe())};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),c)return(0,o.createElement)(o.Fragment,null,a&&(0,o.createElement)("div",{className:"nps-survey-overlay fixed inset-0 bg-[#111827BF]/75 z-[999999999]"}),(0,o.createElement)("div",{className:"max-w-[30rem] xs:w-full w-[calc(100%-8px)] flex bg-white rounded-lg fixed bottom-2 z-[9999999999] right-2 p-4 sm:p-5 border border-solid border-border-tertiary shadow-lg box-border",style:(()=>{const e=12*s;let t=e+8+"px";"xs"===b&&(t=4);const r={bottom:e+8+"px"};return"rtl"===document.documentElement.getAttribute("dir")?r.left=t:r.right=t,r})()},(0,o.createElement)("div",{className:ve(p&&"opacity-50 cursor-progress")},"nps-rating"===d?(0,o.createElement)(w,{...e}):"comment"===d?(0,o.createElement)(ze,{...e}):"plugin-rating"===d?(0,o.createElement)(Ie,{...e}):void 0),(0,o.createElement)("span",{className:"absolute top-3 right-3 cursor-pointer",onClick:function(){p||(u&&"plugin-rating"===d&&we(n,u,"","plugin-rating",i,m,t),xe(n,i,d,r,t))}},(0,o.createElement)(je,{className:"h-5 w-5 text-zip-app-inactive-icon","aria-hidden":"true"}))))},Oe=e=>(0,o.createElement)("div",{id:"nps-survey-wrapper",className:"nps-survey-wrapper"},e&&(0,o.createElement)(Te,{...e}));document.querySelectorAll('[data-id^="nps-survey-"]').forEach(((e,t)=>{const r=(0,n.createRoot)(e),s=JSON.parse(e.getAttribute("data-vars"));s.npsId=e.dataset.id,s.npsIndex=t,r.render((0,o.createElement)(Oe,{...s,key:s.npsId}))}))},656:(e,t,r)=>{var o=r(609),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=o.useState,a=o.useEffect,l=o.useLayoutEffect,i=o.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var d="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),o=s({inst:{value:r,getSnapshot:t}}),n=o[0].inst,d=o[1];return l((function(){n.value=r,n.getSnapshot=t,c(n)&&d({inst:n})}),[e,r,t]),a((function(){return c(n)&&d({inst:n}),e((function(){c(n)&&d({inst:n})}))}),[e]),i(r),r};t.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:d},763:(e,t,r)=>{var o=r(609),n=r(257),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useSyncExternalStore,l=o.useRef,i=o.useEffect,c=o.useMemo,d=o.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,o,n){var u=l(null);if(null===u.current){var p={hasValue:!1,value:null};u.current=p}else p=u.current;u=c((function(){function e(e){if(!i){if(i=!0,a=e,e=o(e),void 0!==n&&p.hasValue){var t=p.value;if(n(t,e))return l=t}return l=e}if(t=l,s(a,e))return t;var r=o(e);return void 0!==n&&n(t,r)?t:(a=e,l=r)}var a,l,i=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,r,o,n]);var m=a(e,u[0],u[1]);return i((function(){p.hasValue=!0,p.value=m}),[m]),d(m),m}},257:(e,t,r)=>{e.exports=r(656)},79:(e,t,r)=>{e.exports=r(763)},609:e=>{e.exports=window.React}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.m=t,e=[],o.O=(t,r,n,s)=>{if(!r){var a=1/0;for(d=0;d=s)&&Object.keys(o.O).every((e=>o.O[e](r[i])))?r.splice(i--,1):(l=!1,s0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,n,s]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={792:0,85:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var n,s,a=r[0],l=r[1],i=r[2],c=0;if(a.some((t=>0!==e[t]))){for(n in l)o.o(l,n)&&(o.m[n]=l[n]);if(i)var d=i(o)}for(t&&t(r);co(45)));n=o.O(n)})(); \ No newline at end of file +(()=>{"use strict";var e,t={45:(e,t,r)=>{var o=r(609);const n=window.wp.element,s=e=>{let t;const r=new Set,o=(e,o)=>{const n="function"==typeof e?e(t):e;if(!Object.is(n,t)){const e=t;t=(null!=o?o:"object"!=typeof n||null===n)?n:Object.assign({},t,n),r.forEach((r=>r(t,e)))}},n=()=>t,s={setState:o,getState:n,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(o,n,s);return s};var a=r(79);const{useDebugValue:l}=o,{useSyncExternalStoreWithSelector:i}=a;let c=!1;const d=e=>e,u=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?s(e):s)(e):e,r=(e,r)=>function(e,t=d,r){r&&!c&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),c=!0);const o=i(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return l(o),o}(t,e,r);return Object.assign(r,t),r},p="SET_CURRENT_STEP",m="SET_NPS_RATING",b="SET_SHOW_NPS",f=document.querySelectorAll('[data-id^="nps-survey-"]'),g={};Array.from(f).forEach((e=>{const t=JSON.parse(e.getAttribute("data-vars"));t.npsId=e.dataset.id,g[t.npsId]={showNps:t?.show_if,currentStep:"plugin-rating"===t?.nps_status?.dismiss_step?"plugin-rating":"nps-rating",npsRating:null,npsId:t.npsId}}));const h=(G=(e,{type:t,payload:r,npsId:o})=>{switch(t){case b:return{...e,[o]:{...e[o],showNps:r}};case p:return{...e,[o]:{...e[o],currentStep:r}};case m:return{...e,[o]:{...e[o],npsRating:r}};default:return e}},M=g,(R=(e,t,r)=>(r.dispatch=t=>(e((e=>G(e,t)),!1,t),t),r.dispatchFromDevtools=!0,{dispatch:(...e)=>r.dispatch(...e),...M}))?u(R):u),y=({children:e})=>(0,o.createElement)("p",{className:"mt-1 mx-0 mb-0 text-base leading-6 font-normal text-zip-body-text"},e),v=({children:e})=>(0,o.createElement)("h3",{className:"my-0 text-lg font-bold leading-7 text-zip-app-heading"},e),x=window.wp.i18n,w=function(e){const{allow_review:t=!1,message:{logo:r,plugin_name:s,nps_rating_title:a,nps_rating_message:l,rating_min_label:i,rating_max_label:c},npsId:d}=e,{dispatch:u}=h(),p=Array.from({length:10},((e,t)=>t+1)),[m,b]=(0,n.useState)(null);return(0,o.createElement)("div",null,(0,o.createElement)("div",{className:"flex items-center justify-start gap-2"},(0,o.createElement)("img",{className:"size-6",src:r,alt:"Brand Logo"}),(0,o.createElement)(v,null,a||s)),(0,o.createElement)(y,null,l.replaceAll("#pluginname",s)),(0,o.createElement)("div",{className:"mt-5"},(0,o.createElement)("span",{className:"isolate inline-flex gap-2 w-full"},p.map((e=>(0,o.createElement)("button",{type:"button",key:e,onClick:()=>async function(e){null===m&&(b(e),u({npsId:d,type:"SET_NPS_RATING",payload:e}),u(t&&e>=8?{npsId:d,type:"SET_CURRENT_STEP",payload:"plugin-rating"}:{npsId:d,type:"SET_CURRENT_STEP",payload:"comment"}))}(e),className:"relative flex-1 inline-flex items-center justify-center bg-white py-1.5 text-sm font-medium text-nps-button-text hover:bg-gray-50 focus:z-10 border border-solid border-button-disabled rounded-md transition-colors ease-in-out duration-150 hover:cursor-pointer"},e))))),(0,o.createElement)("div",{className:"mt-3 flex items-center justify-between"},(0,o.createElement)("span",{className:"text-secondary-text text-xs font-medium leading-5"},i||(0,x.__)("Very unlikely","nps-survey")),(0,o.createElement)("span",{className:"text-secondary-text text-xs font-medium leading-5"},c||(0,x.__)("Very likely","nps-survey"))))},E=e=>{const t=N(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),k(r,t)||_(e)},getConflictingClassGroupIds:(e,t)=>{const n=r[e]||[];return t&&o[e]?[...n,...o[e]]:n}}},k=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?k(e.slice(1),o):void 0;if(n)return n;if(0===t.validators.length)return;const s=e.join("-");return t.validators.find((({validator:e})=>e(s)))?.classGroupId},S=/^\[(.+)\]$/,_=e=>{if(S.test(e)){const t=S.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},N=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return j(Object.entries(e.classGroups),r).forEach((([e,r])=>{z(r,o,e,t)})),o},z=(e,t,r,o)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return C(e)?void z(e(o),t,r,o):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach((([e,n])=>{z(n,I(t,e),r,o)}))}else(""===e?t:I(t,e)).classGroupId=r}))},I=(e,t)=>{let r=e;return t.split("-").forEach((e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)})),r},C=e=>e.isThemeGetter,j=(e,t)=>t?e.map((([e,r])=>[e,r.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,r])=>[t+e,r]))):e))])):e,P=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(n,s)=>{r.set(n,s),t++,t>e&&(t=0,o=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(n(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):n(e,t)}}},T=e=>{const{separator:t,experimentalParseClassName:r}=e,o=1===t.length,n=t[0],s=t.length,a=e=>{const r=[];let a,l=0,i=0;for(let c=0;ci?a-i:void 0}};return r?e=>r({className:e,parseClassName:a}):a},O=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach((e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)})),t.push(...r.sort()),t};var R,G,M;function A(){let e,t,r=0,o="";for(;r{if("string"==typeof e)return e;let t,r="";for(let o=0;ot(e)),e());return r=(e=>({cache:P(e.cacheSize),parseClassName:T(e),...E(e)}))(i),o=r.cache.get,n=r.cache.set,s=a,a(l)};function a(e){const t=o(e);if(t)return t;const s=((e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,s=[];let a="";for(let t=e.length-1;t>=0;){for(;" "===e[t];)--t;const l=e.lastIndexOf(" ",t),i=e.slice(-1===l?0:l+1,t+1);t=l;const{modifiers:c,hasImportantModifier:d,baseClassName:u,maybePostfixModifierPosition:p}=r(i);let m=Boolean(p),b=o(m?u.substring(0,p):u);if(!b){if(!m){a=i+(a.length>0?" "+a:a);continue}if(b=o(u),!b){a=i+(a.length>0?" "+a:a);continue}m=!1}const f=O(c).join(":"),g=d?f+"!":f,h=g+b;if(s.includes(h))continue;s.push(h);const y=n(b,m);for(let e=0;e0?" "+a:a)}return a})(e,r);return n(e,s),s}return function(){return s(A.apply(null,arguments))}}const B=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},L=/^\[(?:([a-z-]+):)?(.+)\]$/i,V=/^\d+\/\d+$/,$=new Set(["px","full","screen"]),H=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,q=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,F=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,U=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,X=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,J=e=>K(e)||$.has(e)||V.test(e),Z=e=>de(e,"length",ue),K=e=>Boolean(e)&&!Number.isNaN(Number(e)),Q=e=>de(e,"number",K),Y=e=>Boolean(e)&&Number.isInteger(Number(e)),ee=e=>e.endsWith("%")&&K(e.slice(0,-1)),te=e=>L.test(e),re=e=>H.test(e),oe=new Set(["length","size","percentage"]),ne=e=>de(e,oe,pe),se=e=>de(e,"position",pe),ae=new Set(["image","url"]),le=e=>de(e,ae,be),ie=e=>de(e,"",me),ce=()=>!0,de=(e,t,r)=>{const o=L.exec(e);return!!o&&(o[1]?"string"==typeof t?o[1]===t:t.has(o[1]):r(o[2]))},ue=e=>q.test(e)&&!F.test(e),pe=()=>!1,me=e=>U.test(e),be=e=>X.test(e),fe=D((Symbol.toStringTag,()=>{const e=B("colors"),t=B("spacing"),r=B("blur"),o=B("brightness"),n=B("borderColor"),s=B("borderRadius"),a=B("borderSpacing"),l=B("borderWidth"),i=B("contrast"),c=B("grayscale"),d=B("hueRotate"),u=B("invert"),p=B("gap"),m=B("gradientColorStops"),b=B("gradientColorStopPositions"),f=B("inset"),g=B("margin"),h=B("opacity"),y=B("padding"),v=B("saturate"),x=B("scale"),w=B("sepia"),E=B("skew"),k=B("space"),S=B("translate"),_=()=>["auto",te,t],N=()=>[te,t],z=()=>["",J,Z],I=()=>["auto",K,te],C=()=>["","0",te],j=()=>[K,te];return{cacheSize:500,separator:":",theme:{colors:[ce],spacing:[J,Z],blur:["none","",re,te],brightness:j(),borderColor:[e],borderRadius:["none","","full",re,te],borderSpacing:N(),borderWidth:z(),contrast:j(),grayscale:C(),hueRotate:j(),invert:C(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[ee,Z],inset:_(),margin:_(),opacity:j(),padding:N(),saturate:j(),scale:j(),sepia:C(),skew:j(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[re]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",te]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Y,te]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",Y,te]}],"grid-cols":[{"grid-cols":[ce]}],"col-start-end":[{col:["auto",{span:["full",Y,te]},te]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ce]}],"row-start-end":[{row:["auto",{span:[Y,te]},te]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[re]},re]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",re,Z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Q]}],"font-family":[{font:[ce]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",te]}],"line-clamp":[{"line-clamp":["none",K,Q]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",J,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",J,Z]}],"underline-offset":[{"underline-offset":["auto",J,te]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",se]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ne]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},le]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[J,te]}],"outline-w":[{outline:[J,Z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[J,Z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",re,ie]}],"shadow-color":[{shadow:[ce]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[i]}],"drop-shadow":[{"drop-shadow":["","none",re,te]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[v]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[i]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Y,te]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",te]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[J,Z,Q]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function ge(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;tfe(function(){for(var e,t,r=0,o="",n=arguments.length;r{t.preventDefault(),o||r({npsId:e,type:"SET_CURRENT_STEP",payload:"nps-rating"})},ke=(0,n.forwardRef)((({variant:e="primary",hasSuffixIcon:t=!1,hasPrefixIcon:r=!1,type:n="button",className:s,onClick:a,children:l,disabled:i=!1,id:c="",size:d="medium",...u},p)=>{const m={base:{default:"px-6 py-3",hasPrefixIcon:"pl-4 pr-6 py-3",hasSuffixIcon:"pl-6 pr-4 py-3"},medium:{default:"px-4 py-3 h-11",hasPrefixIcon:"pl-4 pr-6 py-3",hasSuffixIcon:"pl-6 pr-4 py-3"},small:{default:"px-5 py-2 h-[2.625rem]",hasPrefixIcon:"pl-3 pr-5 py-2 h-[2.625rem]",hasSuffixIcon:"pl-5 pr-3 py-2 h-[2.625rem]"}};return(0,o.createElement)("button",{type:n,className:ve("group flex items-center justify-center gap-2 rounded-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 transition duration-150 ease-in-out cursor-pointer border-0",{primary:"text-white bg-nps-button-background border border-solid border-nps-button-background",secondary:"text-zip-body-text bg-white border border-solid border-zip-body-text",dark:"text-white border border-white bg-transparent border-solid",link:"text-border-secondary underline border-0 bg-transparent",blank:"bg-transparent border-transparent"}[e],!r&&!t&&m[d].default,r&&m[d].hasPrefixIcon,t&&m[d].hasSuffixIcon,{base:"text-base font-medium",medium:"text-base font-medium",small:"text-sm font-medium"}[d],{base:"rounded-md",medium:"rounded-md",small:"rounded"}[d],i&&"cursor-not-allowed opacity-70",s),onClick:e=>{a&&"function"==typeof a&&a(e)},ref:p,disabled:i,...c&&{id:c},...u},l)})),Se=({className:e=""})=>(0,o.createElement)("svg",{className:ve("animate-spin size-5 text-white",e),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},(0,o.createElement)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,o.createElement)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}));function _e({title:e,titleId:t,...r},n){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M17 10a.75.75 0 0 1-.75.75H5.612l4.158 3.96a.75.75 0 1 1-1.04 1.08l-5.5-5.25a.75.75 0 0 1 0-1.08l5.5-5.25a.75.75 0 1 1 1.04 1.08L5.612 9.25H16.25A.75.75 0 0 1 17 10Z",clipRule:"evenodd"}))}const Ne=o.forwardRef(_e),ze=function(e){const{message:{feedback_title:t,feedback_content:r,plugin_rating_title:s,plugin_rating_content:a},plugin_slug:l,privacy_policy:i={disable:!1,url:null},npsId:c}=e,[d,u]=(0,n.useState)(""),p=h((e=>e)),{npsRating:m}=p[c],[b,f]=(0,n.useState)(!1),{dispatch:g}=h(),w=m>=8,E=(0,x.__)("Privacy Policy","nps-survey");return(0,o.createElement)("div",null,(0,o.createElement)("div",{className:"flex justify-between"},(0,o.createElement)(v,null,w?t:s)),(0,o.createElement)(y,null,w?r:a),(0,o.createElement)("div",{className:"mt-5"},(0,o.createElement)("form",{onSubmit:async function(e){e.preventDefault(),b||we(c,m,d,"",g,f,l)}},(0,o.createElement)("div",{className:"mt-2"},(0,o.createElement)("textarea",{rows:6,cols:65,name:"comment",id:"comment",className:"block w-full rounded-md py-1.5 text-zip-body-text shadow-sm border border-border-nps-primary border-solid placeholder:text-nps-placeholder-text focus:ring-1 focus:ring-nps-button-background sm:text-sm sm:leading-6",value:d,onChange:e=>{u(e.target.value)}})),(0,o.createElement)("div",{className:"mt-3 flex justify-between"},(0,o.createElement)(ke,{className:"relative border-none py-2 px-4 pl-0 font-semibold bg-transparent text-nps-button-background",variant:"primary",onClick:e=>Ee(c,e,g,b),size:"small"},(0,o.createElement)(Ne,{className:"w-4"}),(0,x.__)("Back","nps-survey")),(0,o.createElement)(ke,{className:"relative py-2 px-4 font-semibold hover:text-white",variant:"primary",type:"submit",size:"small"},b&&(0,o.createElement)("span",{className:"absolute inset-0 inline-flex items-center justify-center"},(0,o.createElement)(Se,null)),(0,o.createElement)("span",{className:ve(b&&"invisible")},(0,x.__)("Submit","nps-survey")))),!i?.disable&&(0,o.createElement)("div",{className:"mt-1 translate-y-2.5 text-[.625rem] leading-normal text-gray-400 text-right",dangerouslySetInnerHTML:{__html:i?.custom||(0,x.sprintf)( +// translators: %s: `Privacy Policy` text with link +// translators: %s: `Privacy Policy` text with link +(0,x.__)("By submitting, you agree to our %s","nps-survey"),i?.url?`${E}`:E)}}))))},Ie=function(e){const{message:{feedback_title:t,feedback_content:r,plugin_rating_link:n,plugin_rating_button_string:s},dismiss_timespan:a,plugin_slug:l,npsId:i}=e,c=h((e=>e)),{currentStep:d,npsRating:u}=c[i],[p,m]=(0,o.useState)(!1),{dispatch:b}=h(),f=async function(e=!0){we(i,u,"","plugin-rating",b,m,l),xe(i,b,d,a,l),e&&window.open(n,"_blank")};return(0,o.createElement)("div",{className:ve(p&&"opacity-50 cursor-progress")},(0,o.createElement)("div",{className:"flex justify-between"},(0,o.createElement)(v,null,t)),(0,o.createElement)(y,null,r),(0,o.createElement)("div",{className:"flex justify-between mt-5"},(0,o.createElement)(ke,{className:"relative border-none py-2 px-4 pl-0 font-semibold bg-transparent text-nps-button-background",variant:"primary",onClick:e=>Ee(i,e,b),size:"small"},(0,o.createElement)(Ne,{className:"w-4"}),(0,x.__)("Back","nps-survey")),(0,o.createElement)("div",{className:"flex justify-start"},(0,o.createElement)(ke,{variant:"link",className:"py-2 px-4 no-underline font-normal",type:"button",onClick:()=>f(!1),size:"small"},(0,x.__)("I already did!","nps-survey")),(0,o.createElement)(ke,{variant:"primary",className:"py-2 px-4 font-semibold hover:text-white",type:"button",onClick:f,size:"small"},s||(0,x.__)("Rate the Plugin","nps-survey")))))};function Ce({title:e,titleId:t,...r},n){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?o.createElement("title",{id:t},e):null,o.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const je=o.forwardRef(Ce),Pe=()=>{const e=window.innerWidth,t={xs:512,sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const r in t)if(e<=t[r])return r},Te=e=>{const{plugin_slug:t,dismiss_timespan:r,npsId:n,popup:s={placement:"bottom-right"},show_overlay:a=!1}=e,l=h((e=>e)),{dispatch:i}=h(),{showNps:c,currentStep:d,npsRating:u}=l[n],[p,m]=(0,o.useState)(!1),[b,f]=(0,o.useState)(Pe());if((0,o.useEffect)((()=>{const e=()=>{f(Pe())};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),c)return(0,o.createElement)(o.Fragment,null,a&&(0,o.createElement)("div",{className:"nps-survey-overlay fixed inset-0 bg-[#111827BF]/75 z-[999999999]"}),(0,o.createElement)("div",{className:ve("comment"===d?"max-w-[36em]":"max-w-[30rem]","xs:w-full w-[calc(100%-8px)] flex bg-white rounded-lg fixed z-[9999999999] right-2 p-4 sm:p-5 border border-solid border-border-tertiary shadow-lg box-border"),style:(()=>{let e="8px";"xs"===b&&(e=4);const t={},[r,o="center"]=s?.placement?s?.placement.split("-"):["bottom","right"];"top"===r?t.top="8px":"center"===r?(t.top="50%",t.translate="0 -50%"):t.bottom="8px";const n="rtl"===document.documentElement.dir,a={left:n?"right":"left",right:n?"left":"right",center:"center"},l=a[o]||a.right;return"center"===l?(t.left="50%",t.transform="translateX(-50%)"):t[l]=e,t})()},(0,o.createElement)("div",{className:ve("w-full",p&&"opacity-50 cursor-progress")},"nps-rating"===d?(0,o.createElement)(w,{...e}):"comment"===d?(0,o.createElement)(ze,{...e}):"plugin-rating"===d?(0,o.createElement)(Ie,{...e}):void 0),(0,o.createElement)("span",{className:"absolute top-3 right-3 left-auto cursor-pointer",onClick:function(){p||(u&&"plugin-rating"===d&&we(n,u,"","plugin-rating",i,m,t),xe(n,i,d,r,t))}},(0,o.createElement)(je,{className:"h-5 w-5 text-zip-app-inactive-icon","aria-hidden":"true"}))))},Oe=e=>(0,o.createElement)("div",{id:"nps-survey-wrapper",className:"nps-survey-wrapper"},e&&(0,o.createElement)(Te,{...e}));document.querySelectorAll('[data-id^="nps-survey-"]').forEach(((e,t)=>{const r=(0,n.createRoot)(e),s=JSON.parse(e.getAttribute("data-vars"));s.npsId=e.dataset.id,s.npsIndex=t,r.render((0,o.createElement)(Oe,{...s,key:s.npsId}))}))},656:(e,t,r)=>{var o=r(609),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=o.useState,a=o.useEffect,l=o.useLayoutEffect,i=o.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var d="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),o=s({inst:{value:r,getSnapshot:t}}),n=o[0].inst,d=o[1];return l((function(){n.value=r,n.getSnapshot=t,c(n)&&d({inst:n})}),[e,r,t]),a((function(){return c(n)&&d({inst:n}),e((function(){c(n)&&d({inst:n})}))}),[e]),i(r),r};t.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:d},763:(e,t,r)=>{var o=r(609),n=r(257),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useSyncExternalStore,l=o.useRef,i=o.useEffect,c=o.useMemo,d=o.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,o,n){var u=l(null);if(null===u.current){var p={hasValue:!1,value:null};u.current=p}else p=u.current;u=c((function(){function e(e){if(!i){if(i=!0,a=e,e=o(e),void 0!==n&&p.hasValue){var t=p.value;if(n(t,e))return l=t}return l=e}if(t=l,s(a,e))return t;var r=o(e);return void 0!==n&&n(t,r)?t:(a=e,l=r)}var a,l,i=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,r,o,n]);var m=a(e,u[0],u[1]);return i((function(){p.hasValue=!0,p.value=m}),[m]),d(m),m}},257:(e,t,r)=>{e.exports=r(656)},79:(e,t,r)=>{e.exports=r(763)},609:e=>{e.exports=window.React}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.m=t,e=[],o.O=(t,r,n,s)=>{if(!r){var a=1/0;for(d=0;d=s)&&Object.keys(o.O).every((e=>o.O[e](r[i])))?r.splice(i--,1):(l=!1,s0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,n,s]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={792:0,85:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var n,s,a=r[0],l=r[1],i=r[2],c=0;if(a.some((t=>0!==e[t]))){for(n in l)o.o(l,n)&&(o.m[n]=l[n]);if(i)var d=i(o)}for(t&&t(r);co(45)));n=o.O(n)})(); \ No newline at end of file diff --git a/inc/lib/nps-survey/dist/style-main-rtl.css b/inc/lib/nps-survey/dist/style-main-rtl.css index 579d1d5a6..e2f689d28 100644 --- a/inc/lib/nps-survey/dist/style-main-rtl.css +++ b/inc/lib/nps-survey/dist/style-main-rtl.css @@ -3,7 +3,7 @@ }.nps-survey-root .absolute {position: absolute }.nps-survey-root .relative {position: relative }.nps-survey-root .inset-0 {inset: 0px -}.nps-survey-root .bottom-2 {bottom: 0.5rem +}.nps-survey-root .left-auto {right: auto }.nps-survey-root .right-2 {left: 0.5rem }.nps-survey-root .right-3 {left: 0.75rem }.nps-survey-root .top-3 {top: 0.75rem @@ -31,7 +31,10 @@ }.nps-survey-root .w-\[calc\(100\%-8px\)\] {width: calc(100% - 8px) }.nps-survey-root .w-full {width: 100% }.nps-survey-root .max-w-\[30rem\] {max-width: 30rem +}.nps-survey-root .max-w-\[36em\] {max-width: 36em }.nps-survey-root .flex-1 {flex: 1 1 0% +}.nps-survey-root .translate-y-2\.5 {--tw-translate-y: 0.625rem;transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) +}.nps-survey-root .transform {transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) }@keyframes spin {to {transform: rotate(-360deg) } }.nps-survey-root .animate-spin {animation: spin 1s linear infinite @@ -77,6 +80,8 @@ }.nps-survey-root .pr-4 {padding-left: 1rem }.nps-survey-root .pr-5 {padding-left: 1.25rem }.nps-survey-root .pr-6 {padding-left: 1.5rem +}.nps-survey-root .text-right {text-align: left +}.nps-survey-root .text-\[\.625rem\] {font-size: .625rem }.nps-survey-root .text-base {font-size: 1rem;line-height: 1.5rem }.nps-survey-root .text-lg {font-size: 1.125rem;line-height: 1.75rem }.nps-survey-root .text-sm {font-size: 0.875rem;line-height: 1.25rem @@ -88,7 +93,10 @@ }.nps-survey-root .leading-5 {line-height: 1.25rem }.nps-survey-root .leading-6 {line-height: 1.5rem }.nps-survey-root .leading-7 {line-height: 1.75rem +}.nps-survey-root .leading-normal {line-height: 1.5 }.nps-survey-root .text-border-secondary {--tw-text-opacity: 1;color: rgb(107 114 128 / var(--tw-text-opacity)) +}.nps-survey-root .text-gray-400 {--tw-text-opacity: 1;color: rgb(156 163 175 / var(--tw-text-opacity)) +}.nps-survey-root .text-inherit {color: inherit }.nps-survey-root .text-nps-button-background {--tw-text-opacity: 1;color: rgb(34 113 177 / var(--tw-text-opacity)) }.nps-survey-root .text-secondary-text {--tw-text-opacity: 1;color: rgb(156 163 175 / var(--tw-text-opacity)) }.nps-survey-root .text-white {--tw-text-opacity: 1;color: rgb(255 255 255 / var(--tw-text-opacity)) @@ -113,6 +121,7 @@ }.nps-survey-root .hover\:bg-gray-50:hover {--tw-bg-opacity: 1;background-color: rgb(249 250 251 / var(--tw-bg-opacity)) }.nps-survey-root .hover\:text-white:hover {--tw-text-opacity: 1;color: rgb(255 255 255 / var(--tw-text-opacity)) }.nps-survey-root .focus\:z-10:focus {z-index: 10 +}.nps-survey-root .focus\:shadow-none:focus {--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) }.nps-survey-root .focus\:ring-1:focus {--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) }.nps-survey-root .focus\:ring-nps-button-background:focus {--tw-ring-opacity: 1;--tw-ring-color: rgb(34 113 177 / var(--tw-ring-opacity)) }.nps-survey-root .focus-visible\:outline:focus-visible {outline-style: solid diff --git a/inc/lib/nps-survey/dist/style-main.css b/inc/lib/nps-survey/dist/style-main.css index 8e47f28bb..e9a9a85ea 100644 --- a/inc/lib/nps-survey/dist/style-main.css +++ b/inc/lib/nps-survey/dist/style-main.css @@ -3,7 +3,7 @@ }.nps-survey-root .absolute {position: absolute }.nps-survey-root .relative {position: relative }.nps-survey-root .inset-0 {inset: 0px -}.nps-survey-root .bottom-2 {bottom: 0.5rem +}.nps-survey-root .left-auto {left: auto }.nps-survey-root .right-2 {right: 0.5rem }.nps-survey-root .right-3 {right: 0.75rem }.nps-survey-root .top-3 {top: 0.75rem @@ -31,7 +31,10 @@ }.nps-survey-root .w-\[calc\(100\%-8px\)\] {width: calc(100% - 8px) }.nps-survey-root .w-full {width: 100% }.nps-survey-root .max-w-\[30rem\] {max-width: 30rem +}.nps-survey-root .max-w-\[36em\] {max-width: 36em }.nps-survey-root .flex-1 {flex: 1 1 0% +}.nps-survey-root .translate-y-2\.5 {--tw-translate-y: 0.625rem;transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) +}.nps-survey-root .transform {transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) }@keyframes spin {to {transform: rotate(360deg) } }.nps-survey-root .animate-spin {animation: spin 1s linear infinite @@ -77,6 +80,8 @@ }.nps-survey-root .pr-4 {padding-right: 1rem }.nps-survey-root .pr-5 {padding-right: 1.25rem }.nps-survey-root .pr-6 {padding-right: 1.5rem +}.nps-survey-root .text-right {text-align: right +}.nps-survey-root .text-\[\.625rem\] {font-size: .625rem }.nps-survey-root .text-base {font-size: 1rem;line-height: 1.5rem }.nps-survey-root .text-lg {font-size: 1.125rem;line-height: 1.75rem }.nps-survey-root .text-sm {font-size: 0.875rem;line-height: 1.25rem @@ -88,7 +93,10 @@ }.nps-survey-root .leading-5 {line-height: 1.25rem }.nps-survey-root .leading-6 {line-height: 1.5rem }.nps-survey-root .leading-7 {line-height: 1.75rem +}.nps-survey-root .leading-normal {line-height: 1.5 }.nps-survey-root .text-border-secondary {--tw-text-opacity: 1;color: rgb(107 114 128 / var(--tw-text-opacity)) +}.nps-survey-root .text-gray-400 {--tw-text-opacity: 1;color: rgb(156 163 175 / var(--tw-text-opacity)) +}.nps-survey-root .text-inherit {color: inherit }.nps-survey-root .text-nps-button-background {--tw-text-opacity: 1;color: rgb(34 113 177 / var(--tw-text-opacity)) }.nps-survey-root .text-secondary-text {--tw-text-opacity: 1;color: rgb(156 163 175 / var(--tw-text-opacity)) }.nps-survey-root .text-white {--tw-text-opacity: 1;color: rgb(255 255 255 / var(--tw-text-opacity)) @@ -113,6 +121,7 @@ }.nps-survey-root .hover\:bg-gray-50:hover {--tw-bg-opacity: 1;background-color: rgb(249 250 251 / var(--tw-bg-opacity)) }.nps-survey-root .hover\:text-white:hover {--tw-text-opacity: 1;color: rgb(255 255 255 / var(--tw-text-opacity)) }.nps-survey-root .focus\:z-10:focus {z-index: 10 +}.nps-survey-root .focus\:shadow-none:focus {--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) }.nps-survey-root .focus\:ring-1:focus {--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000) }.nps-survey-root .focus\:ring-nps-button-background:focus {--tw-ring-opacity: 1;--tw-ring-color: rgb(34 113 177 / var(--tw-ring-opacity)) }.nps-survey-root .focus-visible\:outline:focus-visible {outline-style: solid diff --git a/inc/lib/nps-survey/nps-survey.php b/inc/lib/nps-survey/nps-survey.php index eb09793db..0d4bf24ab 100644 --- a/inc/lib/nps-survey/nps-survey.php +++ b/inc/lib/nps-survey/nps-survey.php @@ -3,7 +3,7 @@ * Plugin Name: NPS Survey * Description: It is a nps survey library. * Author: Brainstorm Force - * Version: 1.0.14 + * Version: 1.0.15 * License: GPL v2 * Text Domain: nps-survey * @@ -19,5 +19,5 @@ define( 'NPS_SURVEY_BASE', plugin_basename( NPS_SURVEY_FILE ) ); define( 'NPS_SURVEY_DIR', plugin_dir_path( NPS_SURVEY_FILE ) ); define( 'NPS_SURVEY_URL', plugins_url( '/', NPS_SURVEY_FILE ) ); -define( 'NPS_SURVEY_VER', '1.0.14' ); +define( 'NPS_SURVEY_VER', '1.0.15' ); require_once 'nps-survey-plugin-loader.php'; diff --git a/inc/lib/nps-survey/version.json b/inc/lib/nps-survey/version.json index 1785d5762..707941cfb 100644 --- a/inc/lib/nps-survey/version.json +++ b/inc/lib/nps-survey/version.json @@ -1,3 +1,3 @@ { - "nps-survey": "1.0.14" + "nps-survey": "1.0.15" } From ef693175b40faf5671e9bb01a91f787a83c3921a Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 11:39:34 +0530 Subject: [PATCH 05/39] updated phpcs workflow file 4 --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be495ad98..799978d19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,9 +41,6 @@ jobs: coverage: none tools: composer, cs2pr - - name: Install npm dependencies - run: npm install - - name: Install composer dependencies run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress From a2de718c680ee3ceeafa5276ede4f34d7034b5a9 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 11:44:35 +0530 Subject: [PATCH 06/39] updated phpcs workflow file 5 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 799978d19..134f3b493 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,8 +59,8 @@ jobs: - name: Lint JS if: always() - run: npm run lint-js + run: npm run lint:js - name: Lint CSS if: always() - run: npm run lint-css + run: npm run lint:css From 0729e2655f4f6ae42b43efda0f29da7a66003653 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 11:58:12 +0530 Subject: [PATCH 07/39] updated phpcs workflow file 6 --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 134f3b493..93534e0cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node: [ 14.17 ] + node: [ 18.15.0 ] php: ['7.4', '8.1'] steps: @@ -44,6 +44,11 @@ jobs: - name: Install composer dependencies run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress + - name: Install npm dependencies + run: | + npm ci + npm list --depth=0 + - name: Run phpcs id: phpcs if: always() From 7a9f54381519ee959376cae1fcbe9983914f270f Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:06:03 +0530 Subject: [PATCH 08/39] updated phpcs workflow file 7 --- .claude/settings.local.json | 10 ++++++++++ .github/workflows/ci.yml | 5 ----- package.json | 6 +++--- 3 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 .claude/settings.local.json diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 000000000..6e0482acb --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,10 @@ +{ + "permissions": { + "allow": [ + "Read(//Users/akshayurankar/Downloads/**)", + "Read(//Users/akshayurankar/Downloads/ultimate-addons-for-gutenberg-master/.github/**)" + ], + "deny": [], + "ask": [] + } +} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93534e0cc..ccd7c0f69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,11 +44,6 @@ jobs: - name: Install composer dependencies run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress - - name: Install npm dependencies - run: | - npm ci - npm list --depth=0 - - name: Run phpcs id: phpcs if: always() diff --git a/package.json b/package.json index 7dfad3472..81d191ffd 100644 --- a/package.json +++ b/package.json @@ -102,9 +102,9 @@ "test:e2e:ci": "npm run test:e2e -- --runInBand", "test:e2e:debug": "npm run test:e2e -- --puppeteer-devtools", "format": "wp-scripts format tests/", - "lint:css": "wp-scripts lint-style tests/", - "lint:js": "wp-scripts lint-js tests/", - "lint:js:fix": "npm run format && wp-scripts lint-js tests/ --fix", + "lint:css": "wp-scripts lint-style", + "lint:js": "wp-scripts lint-js", + "lint:js:fix": "npm run format && wp-scripts lint-js --fix", "env:start": "wp-env start && wp-env run cli \"wp theme activate astra\" && wp-env run cli \"wp rewrite structure '%postname%' --hard --quiet\" && wp-env run cli \"wp rewrite flush\"", "env:stop": "wp-env stop", "env:destroy": "wp-env destroy", From 0564926341d37c478da4cb8b3d806eb1b49e2010 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:14:13 +0530 Subject: [PATCH 09/39] updated phpcbf --- admin/class-hfe-addons-actions.php | 11 +- admin/class-hfe-admin.php | 34 +- build/main.asset.php | 5 +- build/promotion-widget.asset.php | 5 +- inc/class-header-footer-elementor.php | 4 +- inc/class-hfe-analytics.php | 70 +- inc/class-hfe-promotion.php | 420 ++++----- inc/class-hfe-settings-page.php | 90 +- inc/settings/hfe-settings-api.php | 36 +- inc/widgets-manager/base/widgets-config.php | 30 +- .../class-extensions-loader.php | 10 +- inc/widgets-manager/class-widgets-loader.php | 275 +++++- .../extensions/class-reading-progress-bar.php | 314 +++---- .../widgets/basic-posts/basic-posts.php | 42 +- .../widgets/basic-posts/template.php | 11 +- .../breadcrumbs-widget/breadcrumbs-widget.php | 12 +- inc/widgets-manager/widgets/cart/cart.php | 12 +- .../widgets/copyright/copyright.php | 10 +- .../widgets/infocard/infocard.php | 820 +++++++++--------- .../widgets/infocard/module.php | 4 +- .../navigation-menu/navigation-menu.php | 12 +- .../widgets/page-title/page-title.php | 10 +- .../widgets/post-info/post-info.php | 12 +- inc/widgets-manager/widgets/retina/retina.php | 10 +- .../widgets/search-button/search-button.php | 10 +- .../widgets/site-logo/site-logo.php | 10 +- .../widgets/site-tagline/site-tagline.php | 10 +- .../widgets/site-title/site-title.php | 10 +- 28 files changed, 1251 insertions(+), 1048 deletions(-) diff --git a/admin/class-hfe-addons-actions.php b/admin/class-hfe-addons-actions.php index 77b24648a..d74e93f4b 100644 --- a/admin/class-hfe-addons-actions.php +++ b/admin/class-hfe-addons-actions.php @@ -114,11 +114,10 @@ public function hfe_flush_permalink_notice() { wp_send_json_error( 'Unauthorized user' ); } - $permalink_structure = get_option('permalink_structure'); + $permalink_structure = get_option( 'permalink_structure' ); // Check if the permalink structure is not empty. - if ( '' !== $permalink_structure ) - { - update_option('permalink_structure', $permalink_structure); + if ( '' !== $permalink_structure ) { + update_option( 'permalink_structure', $permalink_structure ); flush_rewrite_rules(); // Update the option to true. update_user_meta( get_current_user_id(), 'hfe_permalink_notice_option', 'notice-dismissed' ); @@ -316,7 +315,7 @@ public static function bulk_deactivate_unused_widgets() { // Compare slugs from widget_list to keys in $used_widgets foreach ( self::$widget_list as $slug => $value ) { if ( ! isset( $used_widgets[ $value['slug'] ] ) ) { - if( $slug === 'Scroll_To_Top' || $slug === 'Reading_Progress_Bar' ){ + if ( $slug === 'Scroll_To_Top' || $slug === 'Reading_Progress_Bar' ) { continue; } $unused_widgets[] = $slug; @@ -329,7 +328,7 @@ public static function bulk_deactivate_unused_widgets() { foreach ( self::$widget_list as $slug => $value ) { if ( in_array( $slug, $unused_widgets ) ) { $widgets[ $slug ] = 'disabled'; - $deactivated[] = $slug; + $deactivated[] = $slug; } } diff --git a/admin/class-hfe-admin.php b/admin/class-hfe-admin.php index 96e7ad0e1..af54627f3 100644 --- a/admin/class-hfe-admin.php +++ b/admin/class-hfe-admin.php @@ -120,9 +120,9 @@ private function __construct() { add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_permalink_clear_notice_js' ] ); add_action( 'elementor/editor/before_enqueue_styles', [ $this, 'enqueue_permalink_clear_notice_css' ] ); // Hook into Elementor's editor styles - add_action('elementor/editor/before_enqueue_scripts', [$this, 'enqueue_editor_scripts']); + add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_editor_scripts' ] ); if ( 'yes' === get_option( 'uae_analytics_optin', false ) ) { - add_action('shutdown', [ $this, 'maybe_run_hfe_widgets_usage_check' ] ); + add_action( 'shutdown', [ $this, 'maybe_run_hfe_widgets_usage_check' ] ); } } @@ -130,14 +130,14 @@ private function __construct() { * Enqueuing Promotion widget scripts. */ public function enqueue_editor_scripts() { - wp_enqueue_script( - 'uae-pro-promotion', - HFE_URL . 'build/promotion-widget.js', - [ 'jquery', 'wp-element', 'wp-dom-ready' ], - HFE_VER, - true - ); - } + wp_enqueue_script( + 'uae-pro-promotion', + HFE_URL . 'build/promotion-widget.js', + [ 'jquery', 'wp-element', 'wp-dom-ready' ], + HFE_VER, + true + ); + } /** * Check the page on which Widget check need to be run. @@ -147,7 +147,7 @@ public function maybe_run_hfe_widgets_usage_check() { if ( is_admin() && isset( $_GET['page'] ) && - ( 'uaepro' === $_GET['page'] || 'hfe' === $_GET['page']) + ( 'uaepro' === $_GET['page'] || 'hfe' === $_GET['page'] ) ) { $this->hfe_check_widgets_data_usage(); } @@ -184,7 +184,7 @@ public function enqueue_permalink_clear_notice_css() { return; } - if(isset(self::$elementor_instance)){ + if ( isset( self::$elementor_instance ) ) { $current_post_type = get_post_type( self::$elementor_instance->editor->get_post_id() ); if ( $current_post_type !== 'elementor-hf' ) { @@ -211,7 +211,7 @@ public function enqueue_permalink_clear_notice_js() { return; } - if(isset(self::$elementor_instance)){ + if ( isset( self::$elementor_instance ) ) { $current_post_type = get_post_type( self::$elementor_instance->editor->get_post_id() ); if ( $current_post_type !== 'elementor-hf' ) { @@ -247,14 +247,14 @@ public function print_permalink_clear_notice() { return; } - if(isset(self::$elementor_instance)){ + if ( isset( self::$elementor_instance ) ) { $current_post_type = get_post_type( self::$elementor_instance->editor->get_post_id() ); if ( $current_post_type !== 'elementor-hf' ) { return; } } -?> + ?> - array('react', 'react-dom', 'wp-api-fetch', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '7ff4f98aca8a9b4a534a'); + [ 'react', 'react-dom', 'wp-api-fetch', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-polyfill' ], + 'version' => '7ff4f98aca8a9b4a534a', +]; diff --git a/build/promotion-widget.asset.php b/build/promotion-widget.asset.php index 8c7bcea87..58d5f8cf4 100644 --- a/build/promotion-widget.asset.php +++ b/build/promotion-widget.asset.php @@ -1 +1,4 @@ - array('wp-dom-ready', 'wp-element'), 'version' => '6c05e450e9d92239760e'); + [ 'wp-dom-ready', 'wp-element' ], + 'version' => '6c05e450e9d92239760e', +]; diff --git a/inc/class-header-footer-elementor.php b/inc/class-header-footer-elementor.php index bac35f56e..489e193c8 100644 --- a/inc/class-header-footer-elementor.php +++ b/inc/class-header-footer-elementor.php @@ -130,7 +130,7 @@ function () { } // Filter to change Astra menu positon. - add_filter( 'astra_menu_priority', array( $this, 'update_admin_menu_position' ) ); + add_filter( 'astra_menu_priority', [ $this, 'update_admin_menu_position' ] ); // Scripts and styles. add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ] ); @@ -144,7 +144,7 @@ function () { add_action( 'astra_notice_before_markup_header-footer-elementor-rating', [ $this, 'rating_notice_css' ] ); require_once HFE_DIR . 'inc/class-hfe-analytics.php'; - + } } diff --git a/inc/class-hfe-analytics.php b/inc/class-hfe-analytics.php index fb7689980..850d5bc6f 100644 --- a/inc/class-hfe-analytics.php +++ b/inc/class-hfe-analytics.php @@ -83,50 +83,52 @@ public function maybe_migrate_analytics_tracking() { $new_tracking = get_option( 'uae_analytics_optin', false ); if ( 'yes' === $old_tracking && false === $new_tracking ) { update_option( 'uae_analytics_optin', 'yes' ); - $time = get_option('bsf_analytics_installed_time'); - update_option( 'bsf_analytics_installed_time' , $time ); + $time = get_option( 'bsf_analytics_installed_time' ); + update_option( 'bsf_analytics_installed_time', $time ); } } - - /** - * Callback function to add specific analytics data. - * - * @param array $stats_data existing stats_data. - * @since 2.3.0 - * @return array - */ - public function add_uae_analytics_data( $stats_data ) { + + /** + * Callback function to add specific analytics data. + * + * @param array $stats_data existing stats_data. + * @since 2.3.0 + * @return array + */ + public function add_uae_analytics_data( $stats_data ) { // Check if $stats_data is empty or not an array. - if ( empty( $stats_data ) || ! is_array( $stats_data ) ) { + if ( empty( $stats_data ) || ! is_array( $stats_data ) ) { $stats_data = []; // Initialize as an empty array. } - $stats_data['plugin_data']['uae'] = [ - 'free_version' => HFE_VER, - 'pro_version' => ( defined( 'UAEL_VERSION' ) ? UAEL_VERSION : '' ), - 'site_language' => get_locale(), - 'elementor_version' => ( defined( 'ELEMENTOR_VERSION' ) ? ELEMENTOR_VERSION : '' ), - 'elementor_pro_version' => ( defined( 'ELEMENTOR_PRO_VERSION' ) ? ELEMENTOR_PRO_VERSION : '' ), - 'onboarding_triggered' => ( 'yes' === get_option( 'hfe_onboarding_triggered' ) ) ? 'yes' : 'no', - 'uaelite_subscription' => ( 'done' === get_option( 'uaelite_subscription' ) ) ? 'yes' : 'no' - ]; + $stats_data['plugin_data']['uae'] = [ + 'free_version' => HFE_VER, + 'pro_version' => ( defined( 'UAEL_VERSION' ) ? UAEL_VERSION : '' ), + 'site_language' => get_locale(), + 'elementor_version' => ( defined( 'ELEMENTOR_VERSION' ) ? ELEMENTOR_VERSION : '' ), + 'elementor_pro_version' => ( defined( 'ELEMENTOR_PRO_VERSION' ) ? ELEMENTOR_PRO_VERSION : '' ), + 'onboarding_triggered' => ( 'yes' === get_option( 'hfe_onboarding_triggered' ) ) ? 'yes' : 'no', + 'uaelite_subscription' => ( 'done' === get_option( 'uaelite_subscription' ) ) ? 'yes' : 'no', + ]; - $hfe_posts = get_posts( [ - 'post_type' => 'elementor-hf', - 'post_status' => 'publish', - 'numberposts' => -1 - ] ); + $hfe_posts = get_posts( + [ + 'post_type' => 'elementor-hf', + 'post_status' => 'publish', + 'numberposts' => -1, + ] + ); - $stats_data['plugin_data']['uae']['numeric_values'] = [ - 'total_hfe_templates' => count( $hfe_posts ), - ]; + $stats_data['plugin_data']['uae']['numeric_values'] = [ + 'total_hfe_templates' => count( $hfe_posts ), + ]; $fetch_elementor_data = $this->hfe_get_widgets_usage(); - foreach ($fetch_elementor_data as $key => $value) { - $stats_data['plugin_data']['uae']['numeric_values'][$key] = $value; + foreach ( $fetch_elementor_data as $key => $value ) { + $stats_data['plugin_data']['uae']['numeric_values'][ $key ] = $value; } - return $stats_data; - } + return $stats_data; + } /** * Fetch Elementor data. @@ -137,4 +139,4 @@ private function hfe_get_widgets_usage() { } } } -new HFE_Analytics(); \ No newline at end of file +new HFE_Analytics(); diff --git a/inc/class-hfe-promotion.php b/inc/class-hfe-promotion.php index 10ed18c86..cc99c2fa9 100644 --- a/inc/class-hfe-promotion.php +++ b/inc/class-hfe-promotion.php @@ -10,7 +10,7 @@ namespace HFE\Extensions; if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly + exit; // Exit if accessed directly } use Elementor\Controls_Manager; @@ -20,104 +20,104 @@ */ class HFE_Promotion { - /** - * Constructor - */ - public function __construct() { - // Only show promotions if Ultimate Elementor Pro is not active - if ( ! $this->is_ultimate_elementor_active() ) { - $this->init_hooks(); - } - } + /** + * Constructor + */ + public function __construct() { + // Only show promotions if Ultimate Elementor Pro is not active + if ( ! $this->is_ultimate_elementor_active() ) { + $this->init_hooks(); + } + } - /** - * Initialize hooks - */ - private function init_hooks() { - // Particles Extension - Add to section/column/container background sections - add_action( 'elementor/element/section/section_background/after_section_end', [ $this, 'add_particles_promotion' ], 10 ); - add_action( 'elementor/element/column/section_style/after_section_end', [ $this, 'add_particles_promotion' ], 10 ); - add_action( 'elementor/element/container/section_background/after_section_end', [ $this, 'add_particles_promotion' ], 10 ); - - // Display Conditions - Add to section/column/container advanced sections and common widgets - add_action( 'elementor/element/section/section_advanced/after_section_end', [ $this, 'add_display_conditions_promotion' ], 10 ); - add_action( 'elementor/element/column/section_advanced/after_section_end', [ $this, 'add_display_conditions_promotion' ], 10 ); - add_action( 'elementor/element/container/section_layout/after_section_end', [ $this, 'add_display_conditions_promotion' ], 10 ); - add_action( 'elementor/element/common/_section_style/after_section_end', [ $this, 'add_display_conditions_promotion' ], 10 ); - - // Party Propz Extension - Add to section/column/container advanced sections and common widgets - add_action( 'elementor/element/section/section_advanced/after_section_end', [ $this, 'add_party_propz_promotion' ], 10 ); - add_action( 'elementor/element/column/section_advanced/after_section_end', [ $this, 'add_party_propz_promotion' ], 10 ); - add_action( 'elementor/element/container/section_layout/after_section_end', [ $this, 'add_party_propz_promotion' ], 10 ); - add_action( 'elementor/element/common/_section_style/after_section_end', [ $this, 'add_party_propz_promotion' ], 10 ); - - // Sticky Header - Only for header templates (check if we're in header context) - add_action( 'elementor/element/section/section_advanced/after_section_end', [ $this, 'add_sticky_header_promotion' ], 10 ); - add_action( 'elementor/element/container/section_layout/after_section_end', [ $this, 'add_sticky_header_promotion' ], 10 ); - - } + /** + * Initialize hooks + */ + private function init_hooks() { + // Particles Extension - Add to section/column/container background sections + add_action( 'elementor/element/section/section_background/after_section_end', [ $this, 'add_particles_promotion' ], 10 ); + add_action( 'elementor/element/column/section_style/after_section_end', [ $this, 'add_particles_promotion' ], 10 ); + add_action( 'elementor/element/container/section_background/after_section_end', [ $this, 'add_particles_promotion' ], 10 ); + + // Display Conditions - Add to section/column/container advanced sections and common widgets + add_action( 'elementor/element/section/section_advanced/after_section_end', [ $this, 'add_display_conditions_promotion' ], 10 ); + add_action( 'elementor/element/column/section_advanced/after_section_end', [ $this, 'add_display_conditions_promotion' ], 10 ); + add_action( 'elementor/element/container/section_layout/after_section_end', [ $this, 'add_display_conditions_promotion' ], 10 ); + add_action( 'elementor/element/common/_section_style/after_section_end', [ $this, 'add_display_conditions_promotion' ], 10 ); + + // Party Propz Extension - Add to section/column/container advanced sections and common widgets + add_action( 'elementor/element/section/section_advanced/after_section_end', [ $this, 'add_party_propz_promotion' ], 10 ); + add_action( 'elementor/element/column/section_advanced/after_section_end', [ $this, 'add_party_propz_promotion' ], 10 ); + add_action( 'elementor/element/container/section_layout/after_section_end', [ $this, 'add_party_propz_promotion' ], 10 ); + add_action( 'elementor/element/common/_section_style/after_section_end', [ $this, 'add_party_propz_promotion' ], 10 ); + + // Sticky Header - Only for header templates (check if we're in header context) + add_action( 'elementor/element/section/section_advanced/after_section_end', [ $this, 'add_sticky_header_promotion' ], 10 ); + add_action( 'elementor/element/container/section_layout/after_section_end', [ $this, 'add_sticky_header_promotion' ], 10 ); + + } - /** - * Check if Ultimate Elementor Pro is active - */ - private function is_ultimate_elementor_active() { - return defined( 'UAEL_PRO' ) && UAEL_PRO; - } + /** + * Check if Ultimate Elementor Pro is active + */ + private function is_ultimate_elementor_active() { + return defined( 'UAEL_PRO' ) && UAEL_PRO; + } - /** - * Check if we're editing a header template - */ - private function is_header_template() { - global $post; - - // Validate $post is an object and has ID property - if ( ! is_object( $post ) || ! isset( $post->ID ) || ! is_numeric( $post->ID ) ) { - return false; - } - - // Sanitize post ID - $post_id = absint( $post->ID ); - if ( ! $post_id ) { - return false; - } - - $post_type = get_post_type( $post_id ); - $template_type = get_post_meta( $post_id, 'ehf_template_type', true ); - - // Sanitize template type - $template_type = sanitize_text_field( $template_type ); - - return ( 'elementor-hf' === $post_type && 'type_header' === $template_type ); - } + /** + * Check if we're editing a header template + */ + private function is_header_template() { + global $post; + + // Validate $post is an object and has ID property + if ( ! is_object( $post ) || ! isset( $post->ID ) || ! is_numeric( $post->ID ) ) { + return false; + } + + // Sanitize post ID + $post_id = absint( $post->ID ); + if ( ! $post_id ) { + return false; + } + + $post_type = get_post_type( $post_id ); + $template_type = get_post_meta( $post_id, 'ehf_template_type', true ); + + // Sanitize template type + $template_type = sanitize_text_field( $template_type ); + + return ( 'elementor-hf' === $post_type && 'type_header' === $template_type ); + } - /** - * Generate promotional teaser template - */ - private function get_teaser_template( $args ) { - // Validate input is array - if ( ! is_array( $args ) ) { - $args = []; - } - - $defaults = [ - 'description' => '', - 'upgrade_text' => __( 'Upgrade Now', 'header-footer-elementor' ), - 'upgrade_url' => '', - ]; + /** + * Generate promotional teaser template + */ + private function get_teaser_template( $args ) { + // Validate input is array + if ( ! is_array( $args ) ) { + $args = []; + } + + $defaults = [ + 'description' => '', + 'upgrade_text' => __( 'Upgrade Now', 'header-footer-elementor' ), + 'upgrade_url' => '', + ]; - $args = wp_parse_args( $args, $defaults ); - - // Additional sanitization - $description = sanitize_text_field( $args['description'] ); - $upgrade_text = sanitize_text_field( $args['upgrade_text'] ); - $upgrade_url = esc_url_raw( $args['upgrade_url'] ); - - // Validate URL - if ( ! filter_var( $upgrade_url, FILTER_VALIDATE_URL ) ) { - $upgrade_url = '#'; - } + $args = wp_parse_args( $args, $defaults ); + + // Additional sanitization + $description = sanitize_text_field( $args['description'] ); + $upgrade_text = sanitize_text_field( $args['upgrade_text'] ); + $upgrade_url = esc_url_raw( $args['upgrade_url'] ); + + // Validate URL + if ( ! filter_var( $upgrade_url, FILTER_VALIDATE_URL ) ) { + $upgrade_url = '#'; + } - $html = ' + $html = '
' . esc_html( $description ) . '
@@ -140,133 +140,141 @@ private function get_teaser_template( $args ) { '; - return $html; - } + return $html; + } - /** - * Get sanitized promotion label - */ - private function get_promotion_label( $feature_name ) { - $feature_name = sanitize_text_field( $feature_name ); - $lock_icon = ''; - - // Using sprintf for better string formatting - return sprintf( - /* translators: %1$s: Feature name, %2$s: Lock icon */ - __( 'UAE - %1$s %2$s', 'header-footer-elementor' ), - esc_html( $feature_name ), - $lock_icon // This is safe as it's hardcoded HTML - ); - } + /** + * Get sanitized promotion label + */ + private function get_promotion_label( $feature_name ) { + $feature_name = sanitize_text_field( $feature_name ); + $lock_icon = ''; + + // Using sprintf for better string formatting + return sprintf( + /* translators: %1$s: Feature name, %2$s: Lock icon */ + __( 'UAE - %1$s %2$s', 'header-footer-elementor' ), + esc_html( $feature_name ), + $lock_icon // This is safe as it's hardcoded HTML + ); + } - /** - * Add Particles extension promotion - */ - public function add_particles_promotion( $element ) { - $element->start_controls_section( - 'hfe_particles_promo', - [ - 'label' => $this->get_promotion_label( __( 'Particle Backgrounds', 'header-footer-elementor' ) ), - 'tab' => Controls_Manager::TAB_STYLE, - ] - ); + /** + * Add Particles extension promotion + */ + public function add_particles_promotion( $element ) { + $element->start_controls_section( + 'hfe_particles_promo', + [ + 'label' => $this->get_promotion_label( __( 'Particle Backgrounds', 'header-footer-elementor' ) ), + 'tab' => Controls_Manager::TAB_STYLE, + ] + ); - $element->add_control( - 'hfe_particles_promo_content', - [ - 'type' => Controls_Manager::RAW_HTML, - 'raw' => $this->get_teaser_template([ - 'description' => __( 'Use Particle Backgrounds and other Pro features to extend your toolbox with more control and flexibility.', 'header-footer-elementor' ), - 'upgrade_url' => 'https://ultimateelementor.com/pricing/?utm_source=plugin-editor&utm_medium=particle-background-promo&utm_campaign=uae-upgrade', - ]), - ] - ); + $element->add_control( + 'hfe_particles_promo_content', + [ + 'type' => Controls_Manager::RAW_HTML, + 'raw' => $this->get_teaser_template( + [ + 'description' => __( 'Use Particle Backgrounds and other Pro features to extend your toolbox with more control and flexibility.', 'header-footer-elementor' ), + 'upgrade_url' => 'https://ultimateelementor.com/pricing/?utm_source=plugin-editor&utm_medium=particle-background-promo&utm_campaign=uae-upgrade', + ] + ), + ] + ); - $element->end_controls_section(); - } + $element->end_controls_section(); + } - /** - * Add Display Conditions extension promotion - */ - public function add_display_conditions_promotion( $element ) { - $element->start_controls_section( - 'hfe_display_conditions_promo', - [ - 'label' => $this->get_promotion_label( __( 'Display Conditions', 'header-footer-elementor' ) ), - 'tab' => Controls_Manager::TAB_ADVANCED, - ] - ); + /** + * Add Display Conditions extension promotion + */ + public function add_display_conditions_promotion( $element ) { + $element->start_controls_section( + 'hfe_display_conditions_promo', + [ + 'label' => $this->get_promotion_label( __( 'Display Conditions', 'header-footer-elementor' ) ), + 'tab' => Controls_Manager::TAB_ADVANCED, + ] + ); - $element->add_control( - 'hfe_display_conditions_promo_content', - [ - 'type' => Controls_Manager::RAW_HTML, - 'raw' => $this->get_teaser_template([ - 'description' => __( 'Use Advanced Display Condition and other Pro features to extend your toolbox with more control and flexibility.', 'header-footer-elementor' ), - 'upgrade_url' => 'https://ultimateelementor.com/pricing/?utm_source=plugin-editor&utm_medium=display-conditions-promo&utm_campaign=uae-upgrade', - ]), - ] - ); + $element->add_control( + 'hfe_display_conditions_promo_content', + [ + 'type' => Controls_Manager::RAW_HTML, + 'raw' => $this->get_teaser_template( + [ + 'description' => __( 'Use Advanced Display Condition and other Pro features to extend your toolbox with more control and flexibility.', 'header-footer-elementor' ), + 'upgrade_url' => 'https://ultimateelementor.com/pricing/?utm_source=plugin-editor&utm_medium=display-conditions-promo&utm_campaign=uae-upgrade', + ] + ), + ] + ); - $element->end_controls_section(); - } + $element->end_controls_section(); + } - /** - * Add Party Propz extension promotion - */ - public function add_party_propz_promotion( $element ) { - $element->start_controls_section( - 'hfe_party_propz_promo', - [ - 'label' => $this->get_promotion_label( __( 'Party Propz', 'header-footer-elementor' ) ), - 'tab' => Controls_Manager::TAB_ADVANCED, - ] - ); + /** + * Add Party Propz extension promotion + */ + public function add_party_propz_promotion( $element ) { + $element->start_controls_section( + 'hfe_party_propz_promo', + [ + 'label' => $this->get_promotion_label( __( 'Party Propz', 'header-footer-elementor' ) ), + 'tab' => Controls_Manager::TAB_ADVANCED, + ] + ); - $element->add_control( - 'hfe_party_propz_promo_content', - [ - 'type' => Controls_Manager::RAW_HTML, - 'raw' => $this->get_teaser_template([ - 'description' => __( 'Use Party Propz and other Pro features to extend your toolbox with more control and flexibility.', 'header-footer-elementor' ), - 'upgrade_url' => 'https://ultimateelementor.com/pricing/?utm_source=plugin-editor&utm_medium=party-propz-promo&utm_campaign=uae-upgrade', - ]), - ] - ); + $element->add_control( + 'hfe_party_propz_promo_content', + [ + 'type' => Controls_Manager::RAW_HTML, + 'raw' => $this->get_teaser_template( + [ + 'description' => __( 'Use Party Propz and other Pro features to extend your toolbox with more control and flexibility.', 'header-footer-elementor' ), + 'upgrade_url' => 'https://ultimateelementor.com/pricing/?utm_source=plugin-editor&utm_medium=party-propz-promo&utm_campaign=uae-upgrade', + ] + ), + ] + ); - $element->end_controls_section(); - } + $element->end_controls_section(); + } - /** - * Add Sticky Header extension promotion (only for header templates) - */ - public function add_sticky_header_promotion( $element ) { - // Only show for header templates - if ( ! $this->is_header_template() ) { - return; - } + /** + * Add Sticky Header extension promotion (only for header templates) + */ + public function add_sticky_header_promotion( $element ) { + // Only show for header templates + if ( ! $this->is_header_template() ) { + return; + } - $element->start_controls_section( - 'hfe_sticky_header_promo', - [ - 'label' => $this->get_promotion_label( __( 'Sticky Header', 'header-footer-elementor' ) ), - 'tab' => Controls_Manager::TAB_ADVANCED, - ] - ); + $element->start_controls_section( + 'hfe_sticky_header_promo', + [ + 'label' => $this->get_promotion_label( __( 'Sticky Header', 'header-footer-elementor' ) ), + 'tab' => Controls_Manager::TAB_ADVANCED, + ] + ); - $element->add_control( - 'hfe_sticky_header_promo_content', - [ - 'type' => Controls_Manager::RAW_HTML, - 'raw' => $this->get_teaser_template([ - 'description' => __( 'Use Sticky Header and other Pro features to extend your toolbox with more control and flexibility.', 'header-footer-elementor' ), - 'upgrade_url' => 'https://ultimateelementor.com/pricing/?utm_source=plugin-editor&utm_medium=sticky-header-promo&utm_campaign=uae-upgrade', - ]), - ] - ); + $element->add_control( + 'hfe_sticky_header_promo_content', + [ + 'type' => Controls_Manager::RAW_HTML, + 'raw' => $this->get_teaser_template( + [ + 'description' => __( 'Use Sticky Header and other Pro features to extend your toolbox with more control and flexibility.', 'header-footer-elementor' ), + 'upgrade_url' => 'https://ultimateelementor.com/pricing/?utm_source=plugin-editor&utm_medium=sticky-header-promo&utm_campaign=uae-upgrade', + ] + ), + ] + ); - $element->end_controls_section(); - } + $element->end_controls_section(); + } } diff --git a/inc/class-hfe-settings-page.php b/inc/class-hfe-settings-page.php index 455e20bb2..8dad2674d 100644 --- a/inc/class-hfe-settings-page.php +++ b/inc/class-hfe-settings-page.php @@ -47,7 +47,7 @@ public function __construct() { if ( ! HFE_Helper::is_pro_active() ) { if ( is_admin() && current_user_can( 'manage_options' ) ) { add_action( 'admin_menu', [ $this, 'hfe_register_settings_page' ] ); - if( ! defined( 'UAEL_PRO' ) ){ + if ( ! defined( 'UAEL_PRO' ) ) { add_action( 'admin_menu', [ $this, 'hfe_add_upgrade_to_pro' ] ); add_action( 'admin_footer', [ $this, 'hfe_add_upgrade_to_pro_target_attr' ] ); } @@ -59,7 +59,7 @@ public function __construct() { add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_scripts' ] ); add_filter( 'plugin_action_links_' . HFE_PATH, [ $this, 'settings_link' ] ); - add_filter( 'plugin_action_links_' . HFE_PATH, [ $this, 'upgrade_pro_link' ] ); + add_filter( 'plugin_action_links_' . HFE_PATH, [ $this, 'upgrade_pro_link' ] ); if ( version_compare( get_bloginfo( 'version' ), '5.1.0', '>=' ) ) { add_filter( 'wp_check_filetype_and_ext', [ $this, 'real_mime_types_5_1_0' ], 10, 5 ); @@ -92,7 +92,7 @@ public function __construct() { public function upgrade_pro_link( $links ) { $plugin_file = 'ultimate-elementor/ultimate-elementor.php'; if ( ! file_exists( WP_PLUGIN_DIR . '/' . $plugin_file ) && ! HFE_Helper::is_pro_active() ) { - $links[] = '' . esc_html__( 'Get UAE Pro', 'header-footer-elementor' ) . ''; + $links[] = '' . esc_html__( 'Get UAE Pro', 'header-footer-elementor' ) . ''; } return $links; @@ -144,12 +144,12 @@ public static function show_nps_notice() { 'plugin_name' => __( 'Ultimate Addons for Elementor', 'header-footer-elementor' ), 'nps_rating_message' => __( 'How likely are you to recommend Ultimate Addons for Elementor to your friends or colleagues?', 'header-footer-elementor' ), // Step 2A i.e. positive. - 'feedback_title' => __( 'Thanks a lot for your feedback! 😍', 'header-footer-elementor' ), - 'feedback_content' => __( 'Thanks for using Ultimate Addons! Got feedback or suggestions to make it even better? We’d love to hear from you.', 'header-footer-elementor' ), + 'feedback_title' => __( 'Thanks a lot for your feedback! 😍', 'header-footer-elementor' ), + 'feedback_content' => __( 'Thanks for using Ultimate Addons! Got feedback or suggestions to make it even better? We’d love to hear from you.', 'header-footer-elementor' ), 'plugin_rating_link' => esc_url( 'https://www.trustpilot.com/review/ultimateelementor.com' ), // Step 2B i.e. negative. 'plugin_rating_title' => __( 'Thank you for your feedback', 'header-footer-elementor' ), - 'plugin_rating_content' => __( 'We value your input. How can we improve your experience?', 'header-footer-elementor' ), + 'plugin_rating_content' => __( 'We value your input. How can we improve your experience?', 'header-footer-elementor' ), ], ] ); @@ -292,8 +292,8 @@ public function fetch_user_fname() { * @return string|null */ public function fetch_site_url() { - $siteurl = get_option('siteURL'); - if ( !empty( $siteurl ) ) { + $siteurl = get_option( 'siteURL' ); + if ( ! empty( $siteurl ) ) { return $siteurl; } else { return null; @@ -333,9 +333,9 @@ public function enqueue_admin_scripts() { $st_link = HFE_Helper::starter_templates_link(); $hfe_post_url = admin_url( 'post-new.php?post_type=elementor-hf' ); // Fetch the user's email. - $user_email = $this->fetch_user_email(); - $user_name = $this->fetch_user_fname(); - $siteurl = $this->fetch_site_url(); + $user_email = $this->fetch_user_email(); + $user_name = $this->fetch_user_fname(); + $siteurl = $this->fetch_site_url(); $show_theme_support = 'no'; $hfe_theme_status = get_option( 'hfe_is_theme_supported', false ); $analytics_status = get_option( 'uae_analytics_optin', false ); @@ -377,8 +377,8 @@ public function enqueue_admin_scripts() { 'theme_url' => HFE_URL . 'assets/images/settings/layout-template.svg', 'version_url' => HFE_URL . 'assets/images/settings/version.svg', 'version__selected_url' => HFE_URL . 'assets/images/settings/git-compare.svg', - 'tracking_url' => HFE_URL . 'assets/images/settings/tracking.svg', - 'tracking__selected_url' => HFE_URL . 'assets/images/settings/tracking_selected.svg', + 'tracking_url' => HFE_URL . 'assets/images/settings/tracking.svg', + 'tracking__selected_url' => HFE_URL . 'assets/images/settings/tracking_selected.svg', 'user_url' => HFE_URL . 'assets/images/settings/user.svg', 'user__selected_url' => HFE_URL . 'assets/images/settings/user-selected.svg', 'integrations_url' => HFE_URL . 'assets/images/settings/integrations.svg', // Update the path to your assets folder. @@ -388,12 +388,12 @@ public function enqueue_admin_scripts() { 'success_banner' => HFE_URL . 'assets/images/settings/success_bg.png', 'success_badge' => HFE_URL . 'assets/images/settings/success_badge.svg', 'icon_svg' => HFE_URL . 'assets/images/settings/uae-logo-svg.svg', - 'augemented_url' => HFE_URL . 'assets/images/settings/augemented_reality_widgets.png', - 'rocket_svg' => HFE_URL . 'assets/images/settings/rocket.svg', - 'augmented_reality' => HFE_URL . 'assets/images/settings/augmented_reality.png', - 'welcome_new' => HFE_URL . 'assets/images/settings/welcome_new.png', + 'augemented_url' => HFE_URL . 'assets/images/settings/augemented_reality_widgets.png', + 'rocket_svg' => HFE_URL . 'assets/images/settings/rocket.svg', + 'augmented_reality' => HFE_URL . 'assets/images/settings/augmented_reality.png', + 'welcome_new' => HFE_URL . 'assets/images/settings/welcome_new.png', 'icon_new' => HFE_URL . 'assets/images/settings/icon_2.svg', - 'create_new' => HFE_URL . 'assets/images/settings/create_new_banner.png', + 'create_new' => HFE_URL . 'assets/images/settings/create_new_banner.png', 'uaelite_previous_version' => isset( $rollback_versions[0]['value'] ) ? $rollback_versions[0]['value'] : '', 'uaelite_versions' => $rollback_versions, 'uaelite_rollback_url' => esc_url( add_query_arg( 'version', 'VERSION', wp_nonce_url( admin_url( 'admin-post.php?action=uaelite_rollback' ), 'uaelite_rollback' ) ) ), @@ -412,7 +412,7 @@ public function enqueue_admin_scripts() { 'siteurl' => $siteurl, 'analytics_status' => $analytics_status, 'onboarding_success_url' => admin_url( 'admin.php?page=hfe#onboardingsuccess' ), - 'uaelite_subscription' => get_option( 'uaelite_subscription', false ) + 'uaelite_subscription' => get_option( 'uaelite_subscription', false ), ] ); @@ -443,34 +443,34 @@ public function enqueue_admin_scripts() { wp_enqueue_script( 'hfe-admin-script', HFE_URL . 'admin/assets/js/ehf-admin.js', [ 'jquery', 'updates' ], HFE_VER, true ); - $is_dismissed = get_user_meta( get_current_user_id(), 'hfe-popup' ); + $is_dismissed = get_user_meta( get_current_user_id(), 'hfe-popup' ); $upgrade_notice_dismissed = get_user_meta( get_current_user_id(), 'hfe_upgrade_notice_dismissed', 'false' ) === 'true'; $strings = [ - 'addon_activate' => esc_html__( 'Activate', 'header-footer-elementor' ), - 'addon_activated' => esc_html__( 'Activated', 'header-footer-elementor' ), - 'addon_active' => esc_html__( 'Active', 'header-footer-elementor' ), - 'addon_deactivate' => esc_html__( 'Deactivate', 'header-footer-elementor' ), - 'addon_inactive' => esc_html__( 'Inactive', 'header-footer-elementor' ), - 'addon_install' => esc_html__( 'Install', 'header-footer-elementor' ), - 'theme_installed' => esc_html__( 'Theme Installed', 'header-footer-elementor' ), - 'plugin_installed' => esc_html__( 'Plugin Installed', 'header-footer-elementor' ), - 'addon_download' => esc_html__( 'Download', 'header-footer-elementor' ), - 'addon_exists' => esc_html__( 'Already Exists.', 'header-footer-elementor' ), - 'visit_site' => esc_html__( 'Visit Website', 'header-footer-elementor' ), - 'plugin_error' => esc_html__( 'Could not install. Please download from WordPress.org and install manually.', 'header-footer-elementor' ), - 'subscribe_success' => esc_html__( 'Your details are submitted successfully.', 'header-footer-elementor' ), - 'subscribe_error' => esc_html__( 'Encountered an error while performing your request.', 'header-footer-elementor' ), - 'ajax_url' => admin_url( 'admin-ajax.php' ), - 'nonce' => wp_create_nonce( 'hfe-admin-nonce' ), - 'installer_nonce' => wp_create_nonce( 'updates' ), + 'addon_activate' => esc_html__( 'Activate', 'header-footer-elementor' ), + 'addon_activated' => esc_html__( 'Activated', 'header-footer-elementor' ), + 'addon_active' => esc_html__( 'Active', 'header-footer-elementor' ), + 'addon_deactivate' => esc_html__( 'Deactivate', 'header-footer-elementor' ), + 'addon_inactive' => esc_html__( 'Inactive', 'header-footer-elementor' ), + 'addon_install' => esc_html__( 'Install', 'header-footer-elementor' ), + 'theme_installed' => esc_html__( 'Theme Installed', 'header-footer-elementor' ), + 'plugin_installed' => esc_html__( 'Plugin Installed', 'header-footer-elementor' ), + 'addon_download' => esc_html__( 'Download', 'header-footer-elementor' ), + 'addon_exists' => esc_html__( 'Already Exists.', 'header-footer-elementor' ), + 'visit_site' => esc_html__( 'Visit Website', 'header-footer-elementor' ), + 'plugin_error' => esc_html__( 'Could not install. Please download from WordPress.org and install manually.', 'header-footer-elementor' ), + 'subscribe_success' => esc_html__( 'Your details are submitted successfully.', 'header-footer-elementor' ), + 'subscribe_error' => esc_html__( 'Encountered an error while performing your request.', 'header-footer-elementor' ), + 'ajax_url' => admin_url( 'admin-ajax.php' ), + 'nonce' => wp_create_nonce( 'hfe-admin-nonce' ), + 'installer_nonce' => wp_create_nonce( 'updates' ), 'upgrade_notice_dismissed' => $upgrade_notice_dismissed, - 'popup_dismiss' => false, - 'data_source' => 'HFE', - 'show_all_hfe' => $show_view_all, - 'hfe_edit_url' => $hfe_edit_url, - 'view_all_text' => esc_html__( 'View All', 'header-footer-elementor' ), - 'header_footer_builder' => $hfe_edit_url, + 'popup_dismiss' => false, + 'data_source' => 'HFE', + 'show_all_hfe' => $show_view_all, + 'hfe_edit_url' => $hfe_edit_url, + 'view_all_text' => esc_html__( 'View All', 'header-footer-elementor' ), + 'header_footer_builder' => $hfe_edit_url, ]; $strings = apply_filters( 'hfe_admin_strings', $strings ); @@ -741,7 +741,7 @@ public function hfe_add_upgrade_to_pro() { add_submenu_page( $this->menu_slug, __( 'Upgrade to Pro', 'header-footer-elementor' ), - __( 'Upgrade to Pro', 'header-footer-elementor' ), + __( 'Upgrade to Pro', 'header-footer-elementor' ), 'manage_options', 'https://ultimateelementor.com/pricing/?utm_source=wp-admin&utm_medium=menu&utm_campaign=uae-upgrade', ); @@ -966,7 +966,7 @@ public function get_guide_html() {
-

', '', '', '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- This code is deprecated and will be removed in future versions?>

+

', '', '', '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- This code is deprecated and will be removed in future versions ?>

diff --git a/inc/settings/hfe-settings-api.php b/inc/settings/hfe-settings-api.php index 60f6559a9..ef3ddde66 100644 --- a/inc/settings/hfe-settings-api.php +++ b/inc/settings/hfe-settings-api.php @@ -240,8 +240,8 @@ public function get_api_domain() { /** * Send Email to Webhook. + * * @param WP_REST_Request $request Request object. - * */ public function send_email_to_webhook_api( WP_REST_Request $request ) { $nonce = $request->get_header( 'X-WP-Nonce' ); @@ -249,31 +249,31 @@ public function send_email_to_webhook_api( WP_REST_Request $request ) { return new WP_Error( 'invalid_nonce', __( 'Invalid nonce', 'header-footer-elementor' ), [ 'status' => 403 ] ); } - $email = sanitize_email( $request->get_param( 'email' ) ); - $date = sanitize_text_field( $request->get_param( 'date' ) ); - $fname = sanitize_text_field( $request->get_param( 'fname' ) ); - $lname = sanitize_text_field( $request->get_param( 'lname' ) ); + $email = sanitize_email( $request->get_param( 'email' ) ); + $date = sanitize_text_field( $request->get_param( 'date' ) ); + $fname = sanitize_text_field( $request->get_param( 'fname' ) ); + $lname = sanitize_text_field( $request->get_param( 'lname' ) ); $isActive = sanitize_text_field( $request->get_param( 'isActive' ) ); - $domain = sanitize_text_field( $request->get_param( 'domain' ) ); + $domain = sanitize_text_field( $request->get_param( 'domain' ) ); - $api_domain = trailingslashit( $this->get_api_domain() ); + $api_domain = trailingslashit( $this->get_api_domain() ); $api_domain_url = $api_domain . 'wp-json/uaelite/v1/subscribe/'; $validation_url = esc_url_raw( get_site_url() . '/wp-json/hfe/v1/email-response/' ); // Append session_id to track requests. - $body = array( - 'email' => $email, - 'date' => $date, - 'fname' => $fname, - 'lname' => $lname, - 'isActive' => $isActive, - 'domain' => $domain - ); + $body = [ + 'email' => $email, + 'date' => $date, + 'fname' => $fname, + 'lname' => $lname, + 'isActive' => $isActive, + 'domain' => $domain, + ]; - $args = array( + $args = [ 'body' => $body, 'timeout' => 30, - ); + ]; $response = wp_remote_post( $api_domain_url, $args ); @@ -292,7 +292,7 @@ public function send_email_to_webhook_api( WP_REST_Request $request ) { return new WP_REST_Response( [ - 'message' => 'success' + 'message' => 'success', ], 200 ); diff --git a/inc/widgets-manager/base/widgets-config.php b/inc/widgets-manager/base/widgets-config.php index 463b13d9b..2cf2fc068 100644 --- a/inc/widgets-manager/base/widgets-config.php +++ b/inc/widgets-manager/base/widgets-config.php @@ -49,7 +49,7 @@ public static function get_widget_list() { self::$widget_list = [ - 'Retina' => [ + 'Retina' => [ 'slug' => 'retina', 'title' => __( 'Retina Logo', 'header-footer-elementor' ), 'keywords' => [ 'uael', 'retina', 'image', 'logo' ], @@ -62,7 +62,7 @@ public static function get_widget_list() { 'demo_url' => 'https://ultimateelementor.com/widgets/retina-logo/', 'category' => 'content', ], - 'Page_Title' => [ + 'Page_Title' => [ 'slug' => 'page-title', 'title' => __( 'Page Title', 'header-footer-elementor' ), 'keywords' => [ 'uael', 'title', 'dynamic' ], @@ -210,7 +210,7 @@ public static function get_widget_list() { 'demo_url' => 'https://ultimateelementor.com/widgets/navigation/', 'category' => 'content', ], - 'Site_Logo' => [ + 'Site_Logo' => [ 'slug' => 'site-logo', 'title' => __( 'Site Logo', 'header-footer-elementor' ), 'keywords' => [ 'uael', 'site', 'logo', 'image' ], @@ -223,7 +223,7 @@ public static function get_widget_list() { 'demo_url' => 'https://ultimateelementor.com/widgets/site-logo/', 'category' => 'content', ], - 'Infocard' => [ + 'Infocard' => [ 'slug' => 'hfe-infocard', 'title' => __( 'Info Card', 'header-footer-elementor' ), 'keywords' => [ 'uael', 'icon', 'dynamic', 'box', 'card', 'cta' ], @@ -236,7 +236,7 @@ public static function get_widget_list() { 'demo_url' => 'https://ultimateelementor.com/widgets/info-card/', 'category' => 'content', ], - 'Search_Button' => [ + 'Search_Button' => [ 'slug' => 'hfe-search-button', 'title' => __( 'Search', 'header-footer-elementor' ), 'keywords' => [ 'uael', 'title', 'dynamic' ], @@ -248,7 +248,7 @@ public static function get_widget_list() { 'description' => __( 'Add a search bar to help visitors find content easily.', 'header-footer-elementor' ), 'demo_url' => 'https://ultimateelementor.com/widgets/search/', 'category' => 'content', - ], + ], ]; return apply_filters( 'hfe_widgets_data', self::$widget_list ); @@ -1029,7 +1029,7 @@ public static function get_bsf_plugins() { $plugins = [ - 'surerank/surerank.php' => [ + 'surerank/surerank.php' => [ 'icon' => $images_url . 'surerank.svg', 'type' => 'plugin', 'name' => esc_html__( 'Boost Your Traffic with Easy SEO Optimization!', 'header-footer-elementor' ), @@ -1042,7 +1042,7 @@ public static function get_bsf_plugins() { 'status' => self::get_plugin_status( 'surerank/surerank.php' ), 'settings_url' => admin_url( 'admin.php?page=surerank_onboarding' ), ], - 'surecart/surecart.php' => [ + 'surecart/surecart.php' => [ 'icon' => $images_url . 'surecart.svg', 'type' => 'plugin', 'name' => esc_html__( 'Sell Products Effortlessly with SureCart!', 'header-footer-elementor' ), @@ -1055,7 +1055,7 @@ public static function get_bsf_plugins() { 'status' => self::get_plugin_status( 'surecart/surecart.php' ), 'settings_url' => admin_url( 'admin.php?page=sc-getting-started' ), ], - 'sureforms/sureforms.php' => [ + 'sureforms/sureforms.php' => [ 'icon' => $images_url . 'sureforms.svg', 'type' => 'plugin', 'name' => esc_html__( 'Build Powerful Forms in Minutes with SureForms!', 'header-footer-elementor' ), @@ -1068,7 +1068,7 @@ public static function get_bsf_plugins() { 'status' => self::get_plugin_status( 'sureforms/sureforms.php' ), 'settings_url' => admin_url( 'admin.php?page=sureforms_menu' ), ], - 'presto-player/presto-player.php' => [ + 'presto-player/presto-player.php' => [ 'icon' => $images_url . 'pplayer.svg', 'type' => 'plugin', 'name' => esc_html__( 'Add Engaging Videos Seamlessly with Presto Player!', 'header-footer-elementor' ), @@ -1081,7 +1081,7 @@ public static function get_bsf_plugins() { 'status' => self::get_plugin_status( 'presto-player/presto-player.php' ), 'settings_url' => admin_url( 'edit.php?post_type=pp_video_block' ), ], - 'suretriggers/suretriggers.php' => [ + 'suretriggers/suretriggers.php' => [ 'icon' => $images_url . 'OttoKit-Symbol-Primary.svg', 'type' => 'plugin', 'name' => esc_html__( 'Automate Your Workflows Easily with Ottokit!', 'header-footer-elementor' ), @@ -1137,7 +1137,7 @@ public static function get_recommended_bsf_plugins() { $recommended_plugins = [ - 'astra-sites/astra-sites.php' => [ + 'astra-sites/astra-sites.php' => [ 'icon' => $images_url . 'stemplates.svg', 'type' => 'plugin', 'name' => esc_html__( 'Starter Templates', 'header-footer-elementor' ), @@ -1150,7 +1150,7 @@ public static function get_recommended_bsf_plugins() { 'status' => self::get_plugin_status( 'astra-sites/astra-sites.php' ), 'settings_url' => admin_url( 'admin.php?page=starter-templates' ), ], - 'surerank/surerank.php' => [ + 'surerank/surerank.php' => [ 'icon' => $images_url . 'surerank_extend.svg', 'type' => 'plugin', 'name' => esc_html__( 'SureRank', 'header-footer-elementor' ), @@ -1163,7 +1163,7 @@ public static function get_recommended_bsf_plugins() { 'status' => self::get_plugin_status( 'surerank/surerank.php' ), 'settings_url' => admin_url( 'admin.php?page=surerank_onboarding' ), ], - 'sureforms/sureforms.php' => [ + 'sureforms/sureforms.php' => [ 'icon' => $images_url . 'sureforms_extend.svg', 'type' => 'plugin', 'name' => esc_html__( 'SureForms', 'header-footer-elementor' ), @@ -1176,7 +1176,7 @@ public static function get_recommended_bsf_plugins() { 'status' => self::get_plugin_status( 'sureforms/sureforms.php' ), 'settings_url' => admin_url( 'admin.php?page=sureforms_menu' ), ], - 'suretriggers/suretriggers.php' => [ + 'suretriggers/suretriggers.php' => [ 'icon' => $images_url . 'ottokit.svg', 'type' => 'plugin', 'name' => esc_html__( 'OttoKit (Formerly SureTriggers)', 'header-footer-elementor' ), diff --git a/inc/widgets-manager/class-extensions-loader.php b/inc/widgets-manager/class-extensions-loader.php index 3e5faad71..4cb0b3a8c 100644 --- a/inc/widgets-manager/class-extensions-loader.php +++ b/inc/widgets-manager/class-extensions-loader.php @@ -72,12 +72,12 @@ public function elementor_init() { * @since 1.3.0 */ public static function get_extensions_list() { - $extensions_list = [ - 'Scroll_To_Top' => 'scroll-to-top', - 'Reading_Progress_Bar' => 'reading-progress-bar', - ]; + $extensions_list = [ + 'Scroll_To_Top' => 'scroll-to-top', + 'Reading_Progress_Bar' => 'reading-progress-bar', + ]; - return $extensions_list; + return $extensions_list; } /** diff --git a/inc/widgets-manager/class-widgets-loader.php b/inc/widgets-manager/class-widgets-loader.php index c7d63440a..bfdd9c8d4 100644 --- a/inc/widgets-manager/class-widgets-loader.php +++ b/inc/widgets-manager/class-widgets-loader.php @@ -129,8 +129,8 @@ private function setup_actions_filters() { // Register widgets script. add_action( 'elementor/frontend/after_register_scripts', [ $this, 'register_widget_scripts' ] ); - //Showing Pro Widgets - add_filter('elementor/editor/localize_settings', [$this, 'uae_promote_pro_elements']); + // Showing Pro Widgets + add_filter( 'elementor/editor/localize_settings', [ $this, 'uae_promote_pro_elements' ] ); // Refresh the cart fragments. if ( class_exists( 'woocommerce' ) ) { @@ -184,7 +184,7 @@ private function init_category() { * @return object $this_cat class. */ public function register_widget_category( $this_cat ) { - $category = ( defined( 'UAEL_PLUGIN_SHORT_NAME' ) && (UAEL_PLUGIN_SHORT_NAME !== 'UAE') ) ? UAEL_PLUGIN_SHORT_NAME : __( 'Ultimate Addons', 'header-footer-elementor' ); + $category = ( defined( 'UAEL_PLUGIN_SHORT_NAME' ) && ( UAEL_PLUGIN_SHORT_NAME !== 'UAE' ) ) ? UAEL_PLUGIN_SHORT_NAME : __( 'Ultimate Addons', 'header-footer-elementor' ); $this_cat->add_category( 'hfe-widgets', @@ -254,7 +254,7 @@ public function include_js_files() { */ public function uae_promote_pro_elements( $config ) { - if(defined( 'UAEL_VER' )){ + if ( defined( 'UAEL_VER' ) ) { return $config; } @@ -264,47 +264,232 @@ public function uae_promote_pro_elements( $config ) { if ( isset( $config['promotionWidgets'] ) ) { $promotion_widgets = $config['promotionWidgets']; } - $combine_array = array_merge( $promotion_widgets, - - [ - [ 'name' => 'uael-advanced-heading', 'title' => __( 'Advanced Heading', 'header-footer-elementor' ), 'icon' => 'hfe-icon-advanced-heading', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-modal-popup', 'title' => __( 'Modal Popup', 'header-footer-elementor' ), 'icon' => 'hfe-icon-modal-popup', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-content-toggle', 'title' => __( 'Content Toggle', 'header-footer-elementor' ), 'icon' => 'hfe-icon-content-toggle', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-ba-slider', 'title' => __( 'Before After Slider', 'header-footer-elementor' ), 'icon' => 'hfe-icon-before-after-slider', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-business-hours', 'title' => __( 'Business Hours', 'header-footer-elementor' ), 'icon' => 'hfe-icon-business-hour', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-business-reviews', 'title' => __( 'Business Reviews', 'header-footer-elementor' ), 'icon' => 'hfe-icon-business-review', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-cf7-styler', 'title' => __( 'Contact Form 7 Styler', 'header-footer-elementor' ), 'icon' => 'hfe-icon-contact-form-7', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-countdown', 'title' => __( 'Countdown Timer', 'header-footer-elementor' ), 'icon' => 'hfe-icon-countdown-timer', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-dual-color-heading', 'title' => __( 'Dual Color Heading', 'header-footer-elementor' ), 'icon' => 'hfe-icon-dual-color-heading', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-fancy-heading', 'title' => __( 'Fancy Heading', 'header-footer-elementor' ), 'icon' => 'hfe-icon-fancy-heading', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-faq', 'title' => __( 'FAQ Schema', 'header-footer-elementor' ), 'icon' => 'hfe-icon-faq-schema', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-google-map', 'title' => __( 'Google Map', 'header-footer-elementor' ), 'icon' => 'hfe-icon-google-map', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-gf-styler', 'title' => __( 'Gravity Form Styler', 'header-footer-elementor' ), 'icon' => 'hfe-icon-gravity-form-styler', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-hotspot', 'title' => __( 'Hotspot', 'header-footer-elementor' ), 'icon' => 'hfe-icon-hotspot', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-how-to', 'title' => __( 'How-to Schema', 'header-footer-elementor' ), 'icon' => 'hfe-icon-how-to-schema', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-image-gallery', 'title' => __( 'Image Gallery', 'header-footer-elementor' ), 'icon' => 'hfe-icon-image-gallery', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-infobox', 'title' => __( 'Info Box', 'header-footer-elementor' ), 'icon' => 'hfe-icon-info-box', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-instagram-feed', 'title' => __( 'Instagram Feed', 'header-footer-elementor' ), 'icon' => 'hfe-icon-instagram-feed', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-login-form', 'title' => __( 'Login Form', 'header-footer-elementor' ), 'icon' => 'hfe-icon-login-form', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-marketing-button', 'title' => __( 'Marketing Button', 'header-footer-elementor' ), 'icon' => 'hfe-icon-marketing-button', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-buttons', 'title' => __( 'Multi Buttons', 'header-footer-elementor' ), 'icon' => 'hfe-icon-multi-button', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-nav-menu', 'title' => __( 'Navigation Menu', 'header-footer-elementor' ), 'icon' => 'hfe-icon-navigation-menu', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-offcanvas', 'title' => __( 'Off - Canvas', 'header-footer-elementor' ), 'icon' => 'hfe-icon-off-canvas', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-posts', 'title' => __( 'Posts', 'header-footer-elementor' ), 'icon' => 'hfe-icon-posts', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-price-table', 'title' => __( 'Price Box', 'header-footer-elementor' ), 'icon' => 'hfe-icon-price-box', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-price-list', 'title' => __( 'Price List', 'header-footer-elementor' ), 'icon' => 'hfe-icon-price-list', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-retina-image', 'title' => __( 'Retina Image', 'header-footer-elementor' ), 'icon' => 'hfe-icon-retina-image', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-social-share', 'title' => __( 'Social Share', 'header-footer-elementor' ), 'icon' => 'hfe-icon-social-share', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-table', 'title' => __( 'Table', 'header-footer-elementor' ), 'icon' => 'hfe-icon-table', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-table-of-contents', 'title' => __( 'Table of Contents', 'header-footer-elementor' ), 'icon' => 'hfe-icon-table-of-content', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-team-member', 'title' => __( 'Team Member', 'header-footer-elementor' ), 'icon' => 'hfe-icon-team-member', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-timeline', 'title' => __( 'Timeline', 'header-footer-elementor' ), 'icon' => 'hfe-icon-timeline', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-twitter', 'title' => __( 'Twitter Feed', 'header-footer-elementor' ), 'icon' => 'hfe-icon-twitter-feed-icon', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-registration-form', 'title' => __( 'User Registration Form', 'header-footer-elementor' ), 'icon' => 'hfe-icon-registration-form', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-video', 'title' => __( 'Video', 'header-footer-elementor' ), 'icon' => 'hfe-icon-video', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-video-gallery', 'title' => __( 'Video Gallery', 'header-footer-elementor' ), 'icon' => 'hfe-icon-video-gallery', 'categories' => '["hfe-widgets"]' ], - [ 'name' => 'uael-welcome-music', 'title' => __( 'Welcome Music', 'header-footer-elementor' ), 'icon' => 'hfe-icon-welcome-music', 'categories' => '["hfe-widgets"]' ], - ] + $combine_array = array_merge( + $promotion_widgets, + [ + [ + 'name' => 'uael-advanced-heading', + 'title' => __( 'Advanced Heading', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-advanced-heading', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-modal-popup', + 'title' => __( 'Modal Popup', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-modal-popup', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-content-toggle', + 'title' => __( 'Content Toggle', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-content-toggle', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-ba-slider', + 'title' => __( 'Before After Slider', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-before-after-slider', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-business-hours', + 'title' => __( 'Business Hours', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-business-hour', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-business-reviews', + 'title' => __( 'Business Reviews', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-business-review', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-cf7-styler', + 'title' => __( 'Contact Form 7 Styler', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-contact-form-7', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-countdown', + 'title' => __( 'Countdown Timer', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-countdown-timer', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-dual-color-heading', + 'title' => __( 'Dual Color Heading', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-dual-color-heading', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-fancy-heading', + 'title' => __( 'Fancy Heading', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-fancy-heading', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-faq', + 'title' => __( 'FAQ Schema', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-faq-schema', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-google-map', + 'title' => __( 'Google Map', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-google-map', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-gf-styler', + 'title' => __( 'Gravity Form Styler', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-gravity-form-styler', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-hotspot', + 'title' => __( 'Hotspot', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-hotspot', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-how-to', + 'title' => __( 'How-to Schema', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-how-to-schema', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-image-gallery', + 'title' => __( 'Image Gallery', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-image-gallery', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-infobox', + 'title' => __( 'Info Box', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-info-box', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-instagram-feed', + 'title' => __( 'Instagram Feed', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-instagram-feed', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-login-form', + 'title' => __( 'Login Form', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-login-form', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-marketing-button', + 'title' => __( 'Marketing Button', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-marketing-button', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-buttons', + 'title' => __( 'Multi Buttons', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-multi-button', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-nav-menu', + 'title' => __( 'Navigation Menu', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-navigation-menu', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-offcanvas', + 'title' => __( 'Off - Canvas', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-off-canvas', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-posts', + 'title' => __( 'Posts', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-posts', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-price-table', + 'title' => __( 'Price Box', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-price-box', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-price-list', + 'title' => __( 'Price List', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-price-list', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-retina-image', + 'title' => __( 'Retina Image', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-retina-image', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-social-share', + 'title' => __( 'Social Share', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-social-share', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-table', + 'title' => __( 'Table', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-table', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-table-of-contents', + 'title' => __( 'Table of Contents', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-table-of-content', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-team-member', + 'title' => __( 'Team Member', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-team-member', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-timeline', + 'title' => __( 'Timeline', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-timeline', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-twitter', + 'title' => __( 'Twitter Feed', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-twitter-feed-icon', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-registration-form', + 'title' => __( 'User Registration Form', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-registration-form', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-video', + 'title' => __( 'Video', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-video', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-video-gallery', + 'title' => __( 'Video Gallery', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-video-gallery', + 'categories' => '["hfe-widgets"]', + ], + [ + 'name' => 'uael-welcome-music', + 'title' => __( 'Welcome Music', 'header-footer-elementor' ), + 'icon' => 'hfe-icon-welcome-music', + 'categories' => '["hfe-widgets"]', + ], + ] ); $config['promotionWidgets'] = $combine_array; diff --git a/inc/widgets-manager/extensions/class-reading-progress-bar.php b/inc/widgets-manager/extensions/class-reading-progress-bar.php index 8a188c643..88c97570e 100644 --- a/inc/widgets-manager/extensions/class-reading-progress-bar.php +++ b/inc/widgets-manager/extensions/class-reading-progress-bar.php @@ -10,7 +10,7 @@ use Elementor\Controls_Manager; if ( ! defined( 'ABSPATH' ) ) { - exit; // Exit if accessed directly. + exit; // Exit if accessed directly. } /** @@ -18,162 +18,162 @@ */ class Reading_Progress_Bar { - /** - * Instance - * - * @var null - */ - private static $_instance = null; - - /** - * Get instance - * - * @return self - */ - public static function instance() { - if ( ! isset( self::$_instance ) ) { - self::$_instance = new self(); - } - return self::$_instance; - } - - /** - * Constructor - */ - private function __construct() { - require_once HFE_DIR . '/inc/widgets-manager/extensions/class-reading-progress-bar-settings.php'; - - add_action( 'elementor/kit/register_tabs', [ $this, 'register_extension_tab' ], 1, 40 ); - add_action( 'elementor/documents/register_controls', [ $this, 'page_controls' ], 10 ); - - add_action( 'wp_footer', [ $this, 'render_progress_bar' ] ); - add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ] ); - } - - /** - * Enqueue inline script - */ - public function enqueue_scripts() { - wp_enqueue_script( 'jquery' ); - $script = "!function($){'use strict';$(document).ready(function(){var bar=$('.hfe-reading-progress-bar');if(!bar.length)return;$(window).on('scroll',function(){var s=$(window).scrollTop(),d=$(document).height()-$(window).height(),p=d? s/d*100:0;bar.css('width',p+'%')});});}(jQuery);"; - wp_add_inline_script( 'jquery', $script ); - } - - /** - * Register extension tab - */ - public function register_extension_tab( \Elementor\Core\Kits\Documents\Kit $kit ) { - $kit->register_tab( 'hfe-reading-progress-bar', Reading_Progress_Bar_Settings::class ); - } - - /** - * Render progress bar markup - */ - public function render_progress_bar() { - $post_id = get_the_ID(); - $document = []; - $doc_settings = []; - - if ( \Elementor\Plugin::instance()->preview->is_preview_mode() ) { - $document = \Elementor\Plugin::$instance->documents->get_doc_for_frontend( $post_id ); - } else { - $document = \Elementor\Plugin::$instance->documents->get( $post_id, false ); - } - if ( isset( $document ) && is_object( $document ) ) { - $doc_settings = $document->get_settings(); - } - - $enable_global = $this->get_elementor_settings( 'hfe_reading_progress_enable' ); - $show_bar = false; - if ( 'yes' === $enable_global ) { - $display_on = $this->get_elementor_settings( 'hfe_reading_progress_display_on' ); - - // If display_on is not an array, convert it to one for consistency - if (!is_array($display_on)) { - $display_on = [$display_on]; - } - - // Check if "all" is selected or if the current post type is in the selected types - if (in_array('all', $display_on, true) || in_array(get_post_type($post_id), $display_on, true)) { - $show_bar = true; - } - } - if ( isset( $doc_settings['hfe_reading_progress_disable'] ) && 'yes' === $doc_settings['hfe_reading_progress_disable'] ) { - $show_bar = false; - } - if ( $show_bar ) { - $position = $this->get_elementor_settings( 'hfe_reading_progress_position' ); - $style_container = 'position:fixed;left:0;width:100%;z-index:99999;'; - if ( 'top' === $position ) { - // Add margin-top if user is logged in to account for the admin bar - if ( is_admin_bar_showing() && $position === 'top' ) { - $style_container .= 'margin-top:30px;'; - } - } - $style_bar = 'width:0;'; - $html = "
"; - echo wp_kses_post( $html ); - } - - - } - - /** - * Get kit settings - */ - public function get_elementor_settings( $setting_id ) { - $return = ''; - $extensions_settings = []; - - if ( ! isset( $extensions_settings['kit_settings'] ) ) { - if ( \Elementor\Plugin::instance()->preview->is_preview_mode() ) { - $kit = \Elementor\Plugin::$instance->documents->get_doc_for_frontend( \Elementor\Plugin::$instance->kits_manager->get_active_id() ); - } else { - $kit = \Elementor\Plugin::$instance->documents->get( \Elementor\Plugin::$instance->kits_manager->get_active_id(), true ); - } - if ( isset( $kit ) && is_object( $kit ) ) { - $extensions_settings['kit_settings'] = $kit->get_settings(); - } - } - - if ( isset( $extensions_settings['kit_settings'][ $setting_id ] ) ) { - $return = $extensions_settings['kit_settings'][ $setting_id ]; - } - return $return; - } - - /** - * Add page level controls - */ - public function page_controls( $element ) { - $enable_global = $this->get_elementor_settings( 'hfe_reading_progress_enable' ); - if ( 'yes' !== $enable_global ) { - return; - } - - $element->start_controls_section( - 'hfe_reading_progress_single_section', - [ - 'label' => __( 'Reading Progress Bar', 'header-footer-elementor' ), - 'tab' => Controls_Manager::TAB_SETTINGS, - ] - ); - - $element->add_control( - 'hfe_reading_progress_disable', - [ - 'label' => __( 'Disable For This Page', 'header-footer-elementor' ), - 'type' => Controls_Manager::SWITCHER, - 'default' => '', - 'label_on' => __( 'Yes', 'header-footer-elementor' ), - 'label_off' => __( 'No', 'header-footer-elementor' ), - 'return_value' => 'yes', - 'description' => __('Note: Changes will be applied on the frontend.', 'header-footer-elementor'), - ] - ); - - $element->end_controls_section(); - } + /** + * Instance + * + * @var null + */ + private static $_instance = null; + + /** + * Get instance + * + * @return self + */ + public static function instance() { + if ( ! isset( self::$_instance ) ) { + self::$_instance = new self(); + } + return self::$_instance; + } + + /** + * Constructor + */ + private function __construct() { + require_once HFE_DIR . '/inc/widgets-manager/extensions/class-reading-progress-bar-settings.php'; + + add_action( 'elementor/kit/register_tabs', [ $this, 'register_extension_tab' ], 1, 40 ); + add_action( 'elementor/documents/register_controls', [ $this, 'page_controls' ], 10 ); + + add_action( 'wp_footer', [ $this, 'render_progress_bar' ] ); + add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ] ); + } + + /** + * Enqueue inline script + */ + public function enqueue_scripts() { + wp_enqueue_script( 'jquery' ); + $script = "!function($){'use strict';$(document).ready(function(){var bar=$('.hfe-reading-progress-bar');if(!bar.length)return;$(window).on('scroll',function(){var s=$(window).scrollTop(),d=$(document).height()-$(window).height(),p=d? s/d*100:0;bar.css('width',p+'%')});});}(jQuery);"; + wp_add_inline_script( 'jquery', $script ); + } + + /** + * Register extension tab + */ + public function register_extension_tab( \Elementor\Core\Kits\Documents\Kit $kit ) { + $kit->register_tab( 'hfe-reading-progress-bar', Reading_Progress_Bar_Settings::class ); + } + + /** + * Render progress bar markup + */ + public function render_progress_bar() { + $post_id = get_the_ID(); + $document = []; + $doc_settings = []; + + if ( \Elementor\Plugin::instance()->preview->is_preview_mode() ) { + $document = \Elementor\Plugin::$instance->documents->get_doc_for_frontend( $post_id ); + } else { + $document = \Elementor\Plugin::$instance->documents->get( $post_id, false ); + } + if ( isset( $document ) && is_object( $document ) ) { + $doc_settings = $document->get_settings(); + } + + $enable_global = $this->get_elementor_settings( 'hfe_reading_progress_enable' ); + $show_bar = false; + if ( 'yes' === $enable_global ) { + $display_on = $this->get_elementor_settings( 'hfe_reading_progress_display_on' ); + + // If display_on is not an array, convert it to one for consistency + if ( ! is_array( $display_on ) ) { + $display_on = [ $display_on ]; + } + + // Check if "all" is selected or if the current post type is in the selected types + if ( in_array( 'all', $display_on, true ) || in_array( get_post_type( $post_id ), $display_on, true ) ) { + $show_bar = true; + } + } + if ( isset( $doc_settings['hfe_reading_progress_disable'] ) && 'yes' === $doc_settings['hfe_reading_progress_disable'] ) { + $show_bar = false; + } + if ( $show_bar ) { + $position = $this->get_elementor_settings( 'hfe_reading_progress_position' ); + $style_container = 'position:fixed;left:0;width:100%;z-index:99999;'; + if ( 'top' === $position ) { + // Add margin-top if user is logged in to account for the admin bar + if ( is_admin_bar_showing() && $position === 'top' ) { + $style_container .= 'margin-top:30px;'; + } + } + $style_bar = 'width:0;'; + $html = "
"; + echo wp_kses_post( $html ); + } + + + } + + /** + * Get kit settings + */ + public function get_elementor_settings( $setting_id ) { + $return = ''; + $extensions_settings = []; + + if ( ! isset( $extensions_settings['kit_settings'] ) ) { + if ( \Elementor\Plugin::instance()->preview->is_preview_mode() ) { + $kit = \Elementor\Plugin::$instance->documents->get_doc_for_frontend( \Elementor\Plugin::$instance->kits_manager->get_active_id() ); + } else { + $kit = \Elementor\Plugin::$instance->documents->get( \Elementor\Plugin::$instance->kits_manager->get_active_id(), true ); + } + if ( isset( $kit ) && is_object( $kit ) ) { + $extensions_settings['kit_settings'] = $kit->get_settings(); + } + } + + if ( isset( $extensions_settings['kit_settings'][ $setting_id ] ) ) { + $return = $extensions_settings['kit_settings'][ $setting_id ]; + } + return $return; + } + + /** + * Add page level controls + */ + public function page_controls( $element ) { + $enable_global = $this->get_elementor_settings( 'hfe_reading_progress_enable' ); + if ( 'yes' !== $enable_global ) { + return; + } + + $element->start_controls_section( + 'hfe_reading_progress_single_section', + [ + 'label' => __( 'Reading Progress Bar', 'header-footer-elementor' ), + 'tab' => Controls_Manager::TAB_SETTINGS, + ] + ); + + $element->add_control( + 'hfe_reading_progress_disable', + [ + 'label' => __( 'Disable For This Page', 'header-footer-elementor' ), + 'type' => Controls_Manager::SWITCHER, + 'default' => '', + 'label_on' => __( 'Yes', 'header-footer-elementor' ), + 'label_off' => __( 'No', 'header-footer-elementor' ), + 'return_value' => 'yes', + 'description' => __( 'Note: Changes will be applied on the frontend.', 'header-footer-elementor' ), + ] + ); + + $element->end_controls_section(); + } } Reading_Progress_Bar::instance(); diff --git a/inc/widgets-manager/widgets/basic-posts/basic-posts.php b/inc/widgets-manager/widgets/basic-posts/basic-posts.php index 1d1d82725..bbee8f053 100644 --- a/inc/widgets-manager/widgets/basic-posts/basic-posts.php +++ b/inc/widgets-manager/widgets/basic-posts/basic-posts.php @@ -105,12 +105,12 @@ protected function is_dynamic_content(): bool { */ protected function get_upsale_data() { return [ - 'condition' => ! defined( 'UAEL_VER' ), - 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), - 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), - 'title' => esc_html__( 'Upgrade your Basic Posts Widget', 'header-footer-elementor' ), - 'description' => esc_html__( 'Get the Advanced Posts widget and unlock powerful layouts, filters, and customization options with UAE Pro.', 'header-footer-elementor' ), - 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Basic-Post&utm_medium=editor&utm_campaign=static-promotion' ), + 'condition' => ! defined( 'UAEL_VER' ), + 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), + 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), + 'title' => esc_html__( 'Upgrade your Basic Posts Widget', 'header-footer-elementor' ), + 'description' => esc_html__( 'Get the Advanced Posts widget and unlock powerful layouts, filters, and customization options with UAE Pro.', 'header-footer-elementor' ), + 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Basic-Post&utm_medium=editor&utm_campaign=static-promotion' ), 'upgrade_text' => esc_html__( 'Upgrade Now', 'header-footer-elementor' ), ]; } @@ -227,12 +227,12 @@ protected function register_general_controls() { $this->add_responsive_control( 'columns', [ - 'label' => __( 'Columns', 'header-footer-elementor' ), - 'type' => Controls_Manager::SELECT, - 'default' => '3', - 'tablet_default' => '2', - 'mobile_default' => '1', - 'options' => [ + 'label' => __( 'Columns', 'header-footer-elementor' ), + 'type' => Controls_Manager::SELECT, + 'default' => '3', + 'tablet_default' => '2', + 'mobile_default' => '1', + 'options' => [ '1' => '1', '2' => '2', '3' => '3', @@ -240,7 +240,7 @@ protected function register_general_controls() { '5' => '5', '6' => '6', ], - 'selectors' => [ + 'selectors' => [ '{{WRAPPER}} .hfe-posts-grid' => 'grid-template-columns: repeat({{VALUE}}, 1fr);', ], ] @@ -591,15 +591,15 @@ protected function register_card_style_controls() { $this->add_group_control( Group_Control_Background::get_type(), [ - 'name' => 'card_background', - 'label' => __( 'Background', 'header-footer-elementor' ), - 'types' => [ 'classic', 'gradient' ], - 'selector' => '{{WRAPPER}} .hfe-post-card', + 'name' => 'card_background', + 'label' => __( 'Background', 'header-footer-elementor' ), + 'types' => [ 'classic', 'gradient' ], + 'selector' => '{{WRAPPER}} .hfe-post-card', 'fields_options' => [ 'background' => [ 'default' => 'classic', ], - 'color' => [ + 'color' => [ 'default' => '#F6F6F6', ], ], @@ -622,7 +622,7 @@ protected function register_card_style_controls() { 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ - '{{WRAPPER}} .hfe-post-card' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', + '{{WRAPPER}} .hfe-post-card' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .hfe-post-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} 0{{UNIT}} 0{{UNIT}};', ], ] @@ -965,8 +965,8 @@ protected function query_posts() { // Sanitize inputs. $posts_per_page = absint( $settings['posts_per_page'] ?? 6 ); - $orderby = sanitize_key( $settings['orderby'] ?? 'date' ); - $order = sanitize_key( $settings['order'] ?? 'desc' ); + $orderby = sanitize_key( $settings['orderby'] ?? 'date' ); + $order = sanitize_key( $settings['order'] ?? 'desc' ); // Ensure posts_per_page is within bounds $posts_per_page = max( 1, min( 100, $posts_per_page ) ); diff --git a/inc/widgets-manager/widgets/basic-posts/template.php b/inc/widgets-manager/widgets/basic-posts/template.php index 9224231c3..5ecee7dc5 100644 --- a/inc/widgets-manager/widgets/basic-posts/template.php +++ b/inc/widgets-manager/widgets/basic-posts/template.php @@ -37,10 +37,13 @@ esc_attr( get_the_title() ), - 'loading' => 'lazy' - ] ); + the_post_thumbnail( + $image_size, + [ + 'alt' => esc_attr( get_the_title() ), + 'loading' => 'lazy', + ] + ); ?> diff --git a/inc/widgets-manager/widgets/breadcrumbs-widget/breadcrumbs-widget.php b/inc/widgets-manager/widgets/breadcrumbs-widget/breadcrumbs-widget.php index b363a08d9..a8af7a1a7 100644 --- a/inc/widgets-manager/widgets/breadcrumbs-widget/breadcrumbs-widget.php +++ b/inc/widgets-manager/widgets/breadcrumbs-widget/breadcrumbs-widget.php @@ -95,12 +95,12 @@ protected function is_dynamic_content(): bool { // phpcs:ignore */ protected function get_upsale_data() { return [ - 'condition' => ! defined( 'UAEL_VER' ), - 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), - 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), - 'title' => esc_html__( 'Get more than just Breadcrumbs', 'header-footer-elementor' ), - 'description' => esc_html__( 'UAE Pro includes Schema widgets like FAQ Schema and How-To Schema, helping your content rank higher.', 'header-footer-elementor' ), - 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Breadcrumbs&utm_medium=editor&utm_campaign=static-promotion' ), + 'condition' => ! defined( 'UAEL_VER' ), + 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), + 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), + 'title' => esc_html__( 'Get more than just Breadcrumbs', 'header-footer-elementor' ), + 'description' => esc_html__( 'UAE Pro includes Schema widgets like FAQ Schema and How-To Schema, helping your content rank higher.', 'header-footer-elementor' ), + 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Breadcrumbs&utm_medium=editor&utm_campaign=static-promotion' ), 'upgrade_text' => esc_html__( 'Upgrade Now', 'header-footer-elementor' ), ]; } diff --git a/inc/widgets-manager/widgets/cart/cart.php b/inc/widgets-manager/widgets/cart/cart.php index b41fdb187..7b97c19ce 100644 --- a/inc/widgets-manager/widgets/cart/cart.php +++ b/inc/widgets-manager/widgets/cart/cart.php @@ -77,12 +77,12 @@ public function get_icon() { */ protected function get_upsale_data() { return [ - 'condition' => ! defined( 'UAEL_VER' ), - 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), - 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), - 'title' => esc_html__( 'Upgrade your Cart widget', 'header-footer-elementor' ), - 'description' => esc_html__( 'Get the WooCommerce Add to Cart widget and unlock advanced layouts, styles, and features with UAE Pro.', 'header-footer-elementor' ), - 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Cart&utm_medium=editor&utm_campaign=static-promotion' ), + 'condition' => ! defined( 'UAEL_VER' ), + 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), + 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), + 'title' => esc_html__( 'Upgrade your Cart widget', 'header-footer-elementor' ), + 'description' => esc_html__( 'Get the WooCommerce Add to Cart widget and unlock advanced layouts, styles, and features with UAE Pro.', 'header-footer-elementor' ), + 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Cart&utm_medium=editor&utm_campaign=static-promotion' ), 'upgrade_text' => esc_html__( 'Upgrade Now', 'header-footer-elementor' ), ]; } diff --git a/inc/widgets-manager/widgets/copyright/copyright.php b/inc/widgets-manager/widgets/copyright/copyright.php index 3a31ee6a3..4de0dcd44 100644 --- a/inc/widgets-manager/widgets/copyright/copyright.php +++ b/inc/widgets-manager/widgets/copyright/copyright.php @@ -188,21 +188,21 @@ protected function register_content_copy_right_controls() { */ protected function register_pro_promotion_controls() { - if(! defined( 'UAEL_VER' )){ + if ( ! defined( 'UAEL_VER' ) ) { $this->start_controls_section( 'section_pro_features_field', - array( + [ 'label' => __( 'Go Pro for More Features', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'uae_pro_promotion_notice', [ - 'type' => Controls_Manager::NOTICE, + 'type' => Controls_Manager::NOTICE, 'notice_type' => 'info', 'dismissible' => false, - 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), + 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), ] ); diff --git a/inc/widgets-manager/widgets/infocard/infocard.php b/inc/widgets-manager/widgets/infocard/infocard.php index 7d83ab8f8..4c15e448d 100644 --- a/inc/widgets-manager/widgets/infocard/infocard.php +++ b/inc/widgets-manager/widgets/infocard/infocard.php @@ -86,12 +86,12 @@ public function get_keywords() { */ protected function get_upsale_data() { return [ - 'condition' => ! defined( 'UAEL_VER' ), - 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), - 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), - 'title' => esc_html__( 'Upgrade your Info Card widget', 'header-footer-elementor' ), - 'description' => esc_html__( 'Get the Info Box widget in UAE Pro and unlock advanced layouts, icons, and styling for better content display.', 'header-footer-elementor' ), - 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Infocard&utm_medium=editor&utm_campaign=static-promotion' ), + 'condition' => ! defined( 'UAEL_VER' ), + 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), + 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), + 'title' => esc_html__( 'Upgrade your Info Card widget', 'header-footer-elementor' ), + 'description' => esc_html__( 'Get the Info Box widget in UAE Pro and unlock advanced layouts, icons, and styling for better content display.', 'header-footer-elementor' ), + 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Infocard&utm_medium=editor&utm_campaign=static-promotion' ), 'upgrade_text' => esc_html__( 'Upgrade Now', 'header-footer-elementor' ), ]; } @@ -133,60 +133,60 @@ protected function register_controls() { protected function register_general_content_controls() { $this->start_controls_section( 'section_general_field', - array( + [ 'label' => __( 'General', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'infocard_title', - array( + [ 'label' => __( 'Title', 'header-footer-elementor' ), 'type' => Controls_Manager::TEXT, 'selector' => '{{WRAPPER}} .hfe-infocard-title', - 'dynamic' => array( + 'dynamic' => [ 'active' => true, - ), + ], 'default' => __( 'Info Card', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'infocard_description', - array( + [ 'label' => __( 'Description', 'header-footer-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'selector' => '{{WRAPPER}} .hfe-infocard-text', - 'dynamic' => array( + 'dynamic' => [ 'active' => true, - ), + ], 'default' => __( 'Enter description text here.Lorem ipsum dolor sit amet, consectetur adipiscing. Quo incidunt ullamco.', 'header-footer-elementor' ), - ) + ] ); $this->add_responsive_control( 'infocard_overall_align', - array( + [ 'label' => __( 'Overall Alignment', 'header-footer-elementor' ), 'type' => Controls_Manager::CHOOSE, 'default' => 'center', - 'options' => array( - 'left' => array( + 'options' => [ + 'left' => [ 'title' => __( 'Left', 'header-footer-elementor' ), 'icon' => 'fa fa-align-left', - ), - 'center' => array( + ], + 'center' => [ 'title' => __( 'Center', 'header-footer-elementor' ), 'icon' => 'fa fa-align-center', - ), - 'right' => array( + ], + 'right' => [ 'title' => __( 'Right', 'header-footer-elementor' ), 'icon' => 'fa fa-align-right', - ), - ), - 'selectors' => array( + ], + ], + 'selectors' => [ '{{WRAPPER}} .hfe-infocard' => 'text-align: {{VALUE}};', - ), - ) + ], + ] ); @@ -202,283 +202,283 @@ protected function register_general_content_controls() { protected function register_icon_content_controls() { $this->start_controls_section( 'section_icon_field', - array( + [ 'label' => __( 'Icon', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'infocard_select_icon', - array( - 'label' => __( 'Select Icon', 'header-footer-elementor' ), - 'type' => Controls_Manager::ICONS, - 'default' => array( + [ + 'label' => __( 'Select Icon', 'header-footer-elementor' ), + 'type' => Controls_Manager::ICONS, + 'default' => [ 'value' => '', 'library' => 'fa-solid', - ), - 'render_type' => 'template', - ) + ], + 'render_type' => 'template', + ] ); $this->add_responsive_control( 'infocard_icon_size', - array( + [ 'label' => __( 'Size', 'header-footer-elementor' ), 'type' => Controls_Manager::SLIDER, - 'size_units' => array( 'px', 'em', 'rem' ), - 'range' => array( - 'px' => array( + 'size_units' => [ 'px', 'em', 'rem' ], + 'range' => [ + 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, - ), - '%' => array( + ], + '%' => [ 'min' => 0, 'max' => 100, - ), - 'em' => array( + ], + 'em' => [ 'min' => 0, 'max' => 100, - ), - ), - 'default' => array( + ], + ], + 'default' => [ 'size' => 40, 'unit' => 'px', - ), - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), - 'selectors' => array( + ], + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon i' => 'font-size: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};line-height: {{SIZE}}{{UNIT}}; text-align: center;', '{{WRAPPER}} .hfe-icon-wrap .hfe-icon' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};', - ), - ) + ], + ] ); $this->add_responsive_control( 'infocard_icon_bgsize', - array( + [ 'label' => __( 'Background Size', 'header-footer-elementor' ), 'type' => Controls_Manager::SLIDER, - 'size_units' => array( 'px', 'em', 'rem' ), - 'range' => array( - 'px' => array( + 'size_units' => [ 'px', 'em', 'rem' ], + 'range' => [ + 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, - ), - '%' => array( + ], + '%' => [ 'min' => 0, 'max' => 100, - ), - 'em' => array( + ], + 'em' => [ 'min' => 0, 'max' => 100, - ), - ), - 'default' => array( + ], + ], + 'default' => [ 'size' => 0, 'unit' => 'px', - ), - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), - 'selectors' => array( + ], + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon' => 'padding: {{SIZE}}{{UNIT}}; display:inline-block; box-sizing:content-box;', - ) - ) + ], + ] ); $this->start_controls_tabs( 'infocard_tabs_icon_style' ); $this->start_controls_tab( 'infocard_icon_normal', - array( + [ 'label' => __( 'Normal', 'header-footer-elementor' ), - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), - ) + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], + ] ); $this->add_control( 'infocard_icon_color', - array( - 'label' => __( 'Icon Color', 'header-footer-elementor' ), - 'type' => Controls_Manager::COLOR, - 'global' => array( + [ + 'label' => __( 'Icon Color', 'header-footer-elementor' ), + 'type' => Controls_Manager::COLOR, + 'global' => [ 'default' => Global_Colors::COLOR_PRIMARY, - ), - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), - 'default' => '', - 'selectors' => array( + ], + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], + 'default' => '', + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon i' => 'color: {{VALUE}};', '{{WRAPPER}} .hfe-icon-wrap .hfe-icon svg' => 'fill: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_icon_bgcolor', - array( + [ 'label' => __( 'Background Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'global' => array( + 'global' => [ 'default' => '', - ), - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), + ], + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], 'default' => '', - 'selectors' => array( + 'selectors' => [ '{{WRAPPER}} .hfe-infocard .hfe-icon-wrap .hfe-icon' => 'background-color: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_icon_border', - array( + [ 'label' => __( 'Border Style', 'header-footer-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'label_block' => false, - 'options' => array( + 'options' => [ 'none' => __( 'None', 'header-footer-elementor' ), 'solid' => __( 'Solid', 'header-footer-elementor' ), 'double' => __( 'Double', 'header-footer-elementor' ), 'dotted' => __( 'Dotted', 'header-footer-elementor' ), 'dashed' => __( 'Dashed', 'header-footer-elementor' ), - ), - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), - 'selectors' => array( + ], + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon' => 'border-style: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_icon_border_color', - array( + [ 'label' => __( 'Border Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'global' => array( + 'global' => [ 'default' => Global_Colors::COLOR_PRIMARY, - ), - 'condition' => array( - 'infocard_icon_border!' => 'none', - 'infocard_select_icon[value]!' => '', - ), + ], + 'condition' => [ + 'infocard_icon_border!' => 'none', + 'infocard_select_icon[value]!' => '', + ], 'default' => '', - 'selectors' => array( + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon' => 'border-color: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_icon_border_size', - array( + [ 'label' => __( 'Border Width', 'header-footer-elementor' ), 'type' => Controls_Manager::DIMENSIONS, - 'size_units' => array( 'px' ), - 'default' => array( + 'size_units' => [ 'px' ], + 'default' => [ 'top' => '1', 'bottom' => '1', 'left' => '1', 'right' => '1', 'unit' => 'px', - ), - 'condition' => array( - 'infocard_icon_border!' => 'none', - 'infocard_select_icon[value]!' => '', - ), - 'selectors' => array( + ], + 'condition' => [ + 'infocard_icon_border!' => 'none', + 'infocard_select_icon[value]!' => '', + ], + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; box-sizing:content-box;', - ), - ) + ], + ] ); $this->add_responsive_control( 'infocard_icon_border_radius', - array( + [ 'label' => __( 'Rounded Corners', 'header-footer-elementor' ), 'type' => Controls_Manager::DIMENSIONS, - 'size_units' => array( 'px', '%' ), - 'default' => array( + 'size_units' => [ 'px', '%' ], + 'default' => [ 'top' => '5', 'bottom' => '5', 'left' => '5', 'right' => '5', 'unit' => 'px', - ), - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), - 'selectors' => array( + ], + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; box-sizing:content-box;', - ), - ) + ], + ] ); $this->end_controls_tab(); $this->start_controls_tab( 'infocard_icon_hover', - array( + [ 'label' => __( 'Hover', 'header-footer-elementor' ), - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], - ) + ] ); $this->add_control( 'infocard_icon_hover_color', - array( - 'label' => __( 'Icon Hover Color', 'header-footer-elementor' ), - 'type' => Controls_Manager::COLOR, - 'default' => '', - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), - 'selectors' => array( + [ + 'label' => __( 'Icon Hover Color', 'header-footer-elementor' ), + 'type' => Controls_Manager::COLOR, + 'default' => '', + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon:hover > i' => 'color: {{VALUE}};', '{{WRAPPER}} .hfe-icon-wrap .hfe-icon:hover > svg' => 'fill: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_icon_hover_bgcolor', - array( + [ 'label' => __( 'Background Hover Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '', - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), - 'selectors' => array( + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon:hover' => 'background-color: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_icon_hover_border', - array( + [ 'label' => __( 'Border Hover Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'condition' => array( - 'infocard_icon_border!' => 'none', - 'infocard_select_icon[value]!' => '', - ), + 'condition' => [ + 'infocard_icon_border!' => 'none', + 'infocard_select_icon[value]!' => '', + ], 'default' => '', - 'selectors' => array( + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap .hfe-icon:hover' => 'border-color: {{VALUE}};', - ), - ) + ], + ] ); $this->end_controls_tab(); @@ -497,306 +497,306 @@ protected function register_icon_content_controls() { protected function register_cta_content_controls() { $this->start_controls_section( 'section_cta_field', - array( + [ 'label' => __( 'Call To Action', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'infocard_cta_type', - array( + [ 'label' => __( 'Type', 'header-footer-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'button', 'label_block' => false, - 'options' => array( + 'options' => [ 'none' => __( 'None', 'header-footer-elementor' ), 'link' => __( 'Text', 'header-footer-elementor' ), 'button' => __( 'Button', 'header-footer-elementor' ), - ), - ) + ], + ] ); $this->add_control( 'infocard_link_text', - array( + [ 'label' => __( 'Text', 'header-footer-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Read More', 'header-footer-elementor' ), - 'dynamic' => array( + 'dynamic' => [ 'active' => true, - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_cta_type' => 'link', - ), - ) + ], + ] ); $this->add_control( 'infocard_button_text', - array( + [ 'label' => __( 'Text', 'header-footer-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Click Here', 'header-footer-elementor' ), - 'dynamic' => array( + 'dynamic' => [ 'active' => true, - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_cta_type' => 'button', - ), - ) + ], + ] ); $this->add_control( 'infocard_text_link', - array( + [ 'label' => __( 'Link', 'header-footer-elementor' ), 'type' => Controls_Manager::URL, - 'default' => array( + 'default' => [ 'url' => '#', 'is_external' => '', - ), - 'dynamic' => array( + ], + 'dynamic' => [ 'active' => true, - ), + ], 'show_external' => true, // Show the 'open in new tab' button. - 'condition' => array( + 'condition' => [ 'infocard_cta_type!' => 'none', - ), - ) + ], + ] ); $this->add_control( 'infocard_button_size', - array( + [ 'label' => __( 'Size', 'header-footer-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'sm', - 'options' => array( + 'options' => [ 'xs' => __( 'Extra Small', 'header-footer-elementor' ), 'sm' => __( 'Small', 'header-footer-elementor' ), 'md' => __( 'Medium', 'header-footer-elementor' ), 'lg' => __( 'Large', 'header-footer-elementor' ), 'xl' => __( 'Extra Large', 'header-footer-elementor' ), - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_cta_type' => 'button', - ), - ) + ], + ] ); $this->add_control( 'infocard_button_colors', - array( + [ 'label' => __( 'Colors', 'header-footer-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', - ), - ) + ], + ] ); $this->start_controls_tabs( 'infocard_tabs_button_style' ); $this->start_controls_tab( 'infocard_button_normal', - array( + [ 'label' => __( 'Normal', 'header-footer-elementor' ), - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', - ), - ) + ], + ] ); $this->add_control( 'infocard_button_text_color', - array( + [ 'label' => __( 'Text Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, 'default' => '', - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', - ), - 'selectors' => array( - '{{WRAPPER}} a.elementor-button, {{WRAPPER}} .elementor-button' => 'color: {{VALUE}};' - ), - ) + ], + 'selectors' => [ + '{{WRAPPER}} a.elementor-button, {{WRAPPER}} .elementor-button' => 'color: {{VALUE}};', + ], + ] ); $this->add_group_control( Group_Control_Background::get_type(), - array( + [ 'name' => 'btn_background_color', 'label' => __( 'Background Color', 'header-footer-elementor' ), - 'types' => array( 'classic', 'gradient' ), + 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .elementor-button', - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', - ), - 'fields_options' => array( - 'color' => array( - 'global' => array( + ], + 'fields_options' => [ + 'color' => [ + 'global' => [ 'default' => Global_Colors::COLOR_ACCENT, - ), - ), - ), - ) + ], + ], + ], + ] ); $this->add_control( 'infocard_button_border', - array( + [ 'label' => __( 'Border Style', 'header-footer-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'label_block' => false, - 'options' => array( + 'options' => [ 'none' => __( 'None', 'header-footer-elementor' ), 'default' => __( 'Default', 'header-footer-elementor' ), 'solid' => __( 'Solid', 'header-footer-elementor' ), 'double' => __( 'Double', 'header-footer-elementor' ), 'dotted' => __( 'Dotted', 'header-footer-elementor' ), 'dashed' => __( 'Dashed', 'header-footer-elementor' ), - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_cta_type' => 'button', - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} .elementor-button' => 'border-style: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_button_border_color', - array( + [ 'label' => __( 'Border Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', - 'infocard_button_border!' => array( 'none', 'default' ), - ), + 'infocard_button_border!' => [ 'none', 'default' ], + ], 'default' => '', - 'selectors' => array( + 'selectors' => [ '{{WRAPPER}} .elementor-button' => 'border-color: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_button_border_size', - array( + [ 'label' => __( 'Border Width', 'header-footer-elementor' ), 'type' => Controls_Manager::DIMENSIONS, - 'size_units' => array( 'px' ), - 'default' => array( + 'size_units' => [ 'px' ], + 'default' => [ 'top' => '1', 'bottom' => '1', 'left' => '1', 'right' => '1', 'unit' => 'px', - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_cta_type' => 'button', - 'infocard_button_border!' => array( 'none', 'default' ), - ), - 'selectors' => array( + 'infocard_button_border!' => [ 'none', 'default' ], + ], + 'selectors' => [ '{{WRAPPER}} .elementor-button' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_button_radius', - array( + [ 'label' => __( 'Rounded Corners', 'header-footer-elementor' ), 'type' => Controls_Manager::DIMENSIONS, - 'size_units' => array( 'px', '%' ), - 'default' => array( + 'size_units' => [ 'px', '%' ], + 'default' => [ 'top' => '', 'bottom' => '', 'left' => '', 'right' => '', 'unit' => 'px', - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} a.elementor-button, {{WRAPPER}} .elementor-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_cta_type' => 'button', - ), - ) + ], + ] ); $this->add_responsive_control( 'infocard_button_custom_padding', - array( + [ 'label' => __( 'Padding', 'header-footer-elementor' ), 'type' => Controls_Manager::DIMENSIONS, - 'size_units' => array( 'px', 'em', '%' ), - 'selectors' => array( + 'size_units' => [ 'px', 'em', '%' ], + 'selectors' => [ '{{WRAPPER}} a.elementor-button, {{WRAPPER}} .elementor-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_cta_type' => 'button', - ), - ) + ], + ] ); $this->end_controls_tab(); $this->start_controls_tab( 'infocard_button_hover', - array( + [ 'label' => __( 'Hover', 'header-footer-elementor' ), - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', - ), - ) + ], + ] ); $this->add_control( 'infocard_button_hover_color', - array( + [ 'label' => __( 'Text Hover Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} a.elementor-button:hover, {{WRAPPER}} .elementor-button:hover' => 'color: {{VALUE}};', - ), - ) + ], + ] ); $this->add_group_control( Group_Control_Background::get_type(), - array( + [ 'name' => 'infocard_button_hover_bgcolor', 'label' => __( 'Background Hover Color', 'header-footer-elementor' ), - 'types' => array( 'classic', 'gradient' ), + 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} a.elementor-button:hover, {{WRAPPER}} .elementor-button:hover', - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', - ), - 'fields_options' => array( - 'color' => array( - 'global' => array( + ], + 'fields_options' => [ + 'color' => [ + 'global' => [ 'default' => Global_Colors::COLOR_ACCENT, - ), - ), - ), - ) + ], + ], + ], + ] ); $this->add_control( 'infocard_button_border_hover_color', - array( + [ 'label' => __( 'Border Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', 'infocard_button_border!' => 'none', - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} a.elementor-button:hover, {{WRAPPER}} .elementor-button:hover' => 'border-color: {{VALUE}};', - ), - ) + ], + ] ); $this->end_controls_tab(); @@ -815,28 +815,28 @@ protected function register_cta_content_controls() { protected function register_typo_content_controls() { $this->start_controls_section( 'section_typography_field', - array( + [ 'label' => __( 'Typography', 'header-footer-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, - ) + ] ); $this->add_control( 'infocard_title_typo', - array( + [ 'label' => __( 'Title', 'header-footer-elementor' ), 'type' => Controls_Manager::HEADING, - 'condition' => array( + 'condition' => [ 'infocard_title!' => '', - ), - ) + ], + ] ); $this->add_control( 'infocard_title_tag', - array( + [ 'label' => __( 'Title Tag', 'header-footer-elementor' ), 'type' => Controls_Manager::SELECT, - 'options' => array( + 'options' => [ 'h1' => __( 'H1', 'header-footer-elementor' ), 'h2' => __( 'H2', 'header-footer-elementor' ), 'h3' => __( 'H3', 'header-footer-elementor' ), @@ -845,155 +845,155 @@ protected function register_typo_content_controls() { 'h6' => __( 'H6', 'header-footer-elementor' ), 'div' => __( 'div', 'header-footer-elementor' ), 'p' => __( 'p', 'header-footer-elementor' ), - ), + ], 'default' => 'h3', - 'condition' => array( + 'condition' => [ 'infocard_title!' => '', - ), - ) + ], + ] ); $this->add_group_control( Group_Control_Typography::get_type(), - array( + [ 'name' => 'title_typography', - 'global' => array( + 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY, - ), + ], 'selector' => '{{WRAPPER}} .hfe-infocard-title', - 'condition' => array( + 'condition' => [ 'infocard_title!' => '', - ), - ) + ], + ] ); $this->add_control( 'infocard_title_color', - array( + [ 'label' => __( 'Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'global' => array( + 'global' => [ 'default' => Global_Colors::COLOR_PRIMARY, - ), + ], 'default' => '', - 'condition' => array( + 'condition' => [ 'infocard_title!' => '', - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} .hfe-infocard-title' => 'color: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_desc_typo', - array( + [ 'label' => __( 'Description', 'header-footer-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', - 'condition' => array( + 'condition' => [ 'infocard_description!' => '', - ), - ) + ], + ] ); $this->add_group_control( Group_Control_Typography::get_type(), - array( + [ 'name' => 'desc_typography', - 'global' => array( + 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_TEXT, - ), + ], 'selector' => '{{WRAPPER}} .hfe-infocard-text', - 'condition' => array( + 'condition' => [ 'infocard_description!' => '', - ), - ) + ], + ] ); $this->add_control( 'infocard_desc_color', - array( + [ 'label' => __( 'Description Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'global' => array( + 'global' => [ 'default' => Global_Colors::COLOR_TEXT, - ), + ], 'default' => '', - 'condition' => array( + 'condition' => [ 'infocard_description!' => '', - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} .hfe-infocard-text' => 'color: {{VALUE}};', - ), - ) + ], + ] ); $this->add_control( 'infocard_link_typo', - array( + [ 'label' => __( 'CTA Link Text', 'header-footer-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'link', - ), - ) + ], + ] ); $this->add_control( 'infocard_button_typo', - array( + [ 'label' => __( 'CTA Button Text', 'header-footer-elementor' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', - 'condition' => array( + 'condition' => [ 'infocard_cta_type' => 'button', - ), - ) + ], + ] ); $this->add_group_control( Group_Control_Typography::get_type(), - array( + [ 'name' => 'cta_typography', - 'global' => array( + 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_SECONDARY, - ), + ], 'selector' => '{{WRAPPER}} .hfe-infocard-cta-link, {{WRAPPER}} .elementor-button, {{WRAPPER}} a.elementor-button', - 'condition' => array( - 'infocard_cta_type' => array( 'link', 'button' ), - ), - ) + 'condition' => [ + 'infocard_cta_type' => [ 'link', 'button' ], + ], + ] ); $this->add_control( 'infocard_cta_color', - array( + [ 'label' => __( 'Link Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'global' => array( + 'global' => [ 'default' => Global_Colors::COLOR_ACCENT, - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} .hfe-infocard-cta-link' => 'color: {{VALUE}};', - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_cta_type' => 'link', - ), - ) + ], + ] ); $this->add_control( 'infocard_cta_hover_color', - array( + [ 'label' => __( 'Link Hover Color', 'header-footer-elementor' ), 'type' => Controls_Manager::COLOR, - 'global' => array( + 'global' => [ 'default' => '', - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} .hfe-infocard-cta-link:hover' => 'color: {{VALUE}};', - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_cta_type' => 'link', - ), - ) + ], + ] ); $this->end_controls_section(); @@ -1008,102 +1008,102 @@ protected function register_typo_content_controls() { protected function register_margin_content_controls() { $this->start_controls_section( 'section_margin_field', - array( + [ 'label' => __( 'Margins', 'header-footer-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, - ) + ] ); $this->add_responsive_control( 'infocard_responsive_icon_margin', - array( + [ 'label' => __( 'Icon Margin', 'header-footer-elementor' ), 'type' => Controls_Manager::DIMENSIONS, - 'size_units' => array( 'px' ), - 'default' => array( + 'size_units' => [ 'px' ], + 'default' => [ 'top' => '0', 'bottom' => '10', 'left' => '0', 'right' => '0', 'unit' => 'px', 'isLinked' => false, - ), - 'condition' => array( - 'infocard_select_icon[value]!' => '', - ), - 'selectors' => array( + ], + 'condition' => [ + 'infocard_select_icon[value]!' => '', + ], + 'selectors' => [ '{{WRAPPER}} .hfe-icon-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', - ), - ) + ], + ] ); $this->add_responsive_control( 'infocard_title_margin', - array( + [ 'label' => __( 'Title Margin', 'header-footer-elementor' ), 'type' => Controls_Manager::DIMENSIONS, - 'size_units' => array( 'px' ), - 'default' => array( + 'size_units' => [ 'px' ], + 'default' => [ 'top' => '0', 'bottom' => '10', 'left' => '0', 'right' => '0', 'unit' => 'px', 'isLinked' => false, - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} .hfe-infocard-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_title!' => '', - ), - ) + ], + ] ); $this->add_responsive_control( 'infocard_desc_margin', - array( + [ 'label' => __( 'Description Margins', 'header-footer-elementor' ), 'type' => Controls_Manager::DIMENSIONS, - 'size_units' => array( 'px' ), - 'default' => array( + 'size_units' => [ 'px' ], + 'default' => [ 'top' => '0', 'bottom' => '0', 'left' => '0', 'right' => '0', 'unit' => 'px', 'isLinked' => false, - ), - 'condition' => array( + ], + 'condition' => [ 'infocard_description!' => '', - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} .hfe-infocard-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', - ), - ) + ], + ] ); $this->add_responsive_control( 'infocard_cta_margin', - array( + [ 'label' => __( 'CTA Margin', 'header-footer-elementor' ), 'type' => Controls_Manager::DIMENSIONS, - 'size_units' => array( 'px' ), - 'default' => array( + 'size_units' => [ 'px' ], + 'default' => [ 'top' => '10', 'bottom' => '0', 'left' => '0', 'right' => '0', 'unit' => 'px', 'isLinked' => false, - ), - 'selectors' => array( + ], + 'selectors' => [ '{{WRAPPER}} .hfe-infocard-cta-link-style, {{WRAPPER}} .hfe-button-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', - ), - 'condition' => array( - 'infocard_cta_type' => array( 'link', 'button' ), - ), - ) + ], + 'condition' => [ + 'infocard_cta_type' => [ 'link', 'button' ], + ], + ] ); $this->end_controls_section(); } diff --git a/inc/widgets-manager/widgets/infocard/module.php b/inc/widgets-manager/widgets/infocard/module.php index 38b9a2589..f64c12ad5 100644 --- a/inc/widgets-manager/widgets/infocard/module.php +++ b/inc/widgets-manager/widgets/infocard/module.php @@ -51,9 +51,9 @@ public function get_name() { * @return array Widgets. */ public function get_widgets() { - return array( + return [ 'Infocard', - ); + ]; } /** diff --git a/inc/widgets-manager/widgets/navigation-menu/navigation-menu.php b/inc/widgets-manager/widgets/navigation-menu/navigation-menu.php index ec5f660c3..f2c94724e 100644 --- a/inc/widgets-manager/widgets/navigation-menu/navigation-menu.php +++ b/inc/widgets-manager/widgets/navigation-menu/navigation-menu.php @@ -77,12 +77,12 @@ public function get_title() { */ protected function get_upsale_data() { return [ - 'condition' => ! defined( 'UAEL_VER' ), - 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), - 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), - 'title' => esc_html__( 'Upgrade your Navigation widget', 'header-footer-elementor' ), - 'description' => esc_html__( 'Get the Advanced Navigation Menu widget in UAE Pro and unlock advanced layouts, styling, and flexible menu options.', 'header-footer-elementor' ), - 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Navigation-menu&utm_medium=editor&utm_campaign=static-promotion' ), + 'condition' => ! defined( 'UAEL_VER' ), + 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), + 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), + 'title' => esc_html__( 'Upgrade your Navigation widget', 'header-footer-elementor' ), + 'description' => esc_html__( 'Get the Advanced Navigation Menu widget in UAE Pro and unlock advanced layouts, styling, and flexible menu options.', 'header-footer-elementor' ), + 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Navigation-menu&utm_medium=editor&utm_campaign=static-promotion' ), 'upgrade_text' => esc_html__( 'Upgrade Now', 'header-footer-elementor' ), ]; } diff --git a/inc/widgets-manager/widgets/page-title/page-title.php b/inc/widgets-manager/widgets/page-title/page-title.php index 3eb337648..9485c7440 100644 --- a/inc/widgets-manager/widgets/page-title/page-title.php +++ b/inc/widgets-manager/widgets/page-title/page-title.php @@ -404,21 +404,21 @@ protected function register_page_title_style_controls() { */ protected function register_pro_promotion_controls() { - if(! defined( 'UAEL_VER' )){ + if ( ! defined( 'UAEL_VER' ) ) { $this->start_controls_section( 'section_pro_features_field', - array( + [ 'label' => __( 'Go Pro for More Features', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'uae_pro_promotion_notice', [ - 'type' => Controls_Manager::NOTICE, + 'type' => Controls_Manager::NOTICE, 'notice_type' => 'info', 'dismissible' => false, - 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), + 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), ] ); diff --git a/inc/widgets-manager/widgets/post-info/post-info.php b/inc/widgets-manager/widgets/post-info/post-info.php index 08445c1f2..e67c8f45f 100644 --- a/inc/widgets-manager/widgets/post-info/post-info.php +++ b/inc/widgets-manager/widgets/post-info/post-info.php @@ -83,12 +83,12 @@ public function get_icon() { */ protected function get_upsale_data() { return [ - 'condition' => ! defined( 'UAEL_VER' ), - 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), - 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), - 'title' => esc_html__( 'Upgrade your Post Info widget', 'header-footer-elementor' ), - 'description' => esc_html__( 'Get the Advanced Posts widget and unlock powerful layouts, filters, and customization options with UAE Pro.', 'header-footer-elementor' ), - 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Post-Info&utm_medium=editor&utm_campaign=static-promotion' ), + 'condition' => ! defined( 'UAEL_VER' ), + 'image' => esc_url( HFE_URL . 'assets/images/upgrade-pro.png' ), + 'image_alt' => esc_attr__( 'Upgrade', 'header-footer-elementor' ), + 'title' => esc_html__( 'Upgrade your Post Info widget', 'header-footer-elementor' ), + 'description' => esc_html__( 'Get the Advanced Posts widget and unlock powerful layouts, filters, and customization options with UAE Pro.', 'header-footer-elementor' ), + 'upgrade_url' => esc_url( 'https://ultimateelementor.com/pricing/?utm_source=UAE-Post-Info&utm_medium=editor&utm_campaign=static-promotion' ), 'upgrade_text' => esc_html__( 'Upgrade Now', 'header-footer-elementor' ), ]; } diff --git a/inc/widgets-manager/widgets/retina/retina.php b/inc/widgets-manager/widgets/retina/retina.php index 1dd900caf..00d05017b 100644 --- a/inc/widgets-manager/widgets/retina/retina.php +++ b/inc/widgets-manager/widgets/retina/retina.php @@ -642,21 +642,21 @@ protected function register_helpful_information() { */ protected function register_pro_promotion_controls() { - if(! defined( 'UAEL_VER' )){ + if ( ! defined( 'UAEL_VER' ) ) { $this->start_controls_section( 'section_pro_features_field', - array( + [ 'label' => __( 'Go Pro for More Features', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'uae_pro_promotion_notice', [ - 'type' => Controls_Manager::NOTICE, + 'type' => Controls_Manager::NOTICE, 'notice_type' => 'info', 'dismissible' => false, - 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), + 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), ] ); diff --git a/inc/widgets-manager/widgets/search-button/search-button.php b/inc/widgets-manager/widgets/search-button/search-button.php index b4a5472ff..e7f485a66 100644 --- a/inc/widgets-manager/widgets/search-button/search-button.php +++ b/inc/widgets-manager/widgets/search-button/search-button.php @@ -975,21 +975,21 @@ protected function register_search_style_controls(): void { */ protected function register_pro_promotion_controls() { - if(! defined( 'UAEL_VER' )){ + if ( ! defined( 'UAEL_VER' ) ) { $this->start_controls_section( 'section_pro_features_field', - array( + [ 'label' => __( 'Go Pro for More Features', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'uae_pro_promotion_notice', [ - 'type' => Controls_Manager::NOTICE, + 'type' => Controls_Manager::NOTICE, 'notice_type' => 'info', 'dismissible' => false, - 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), + 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), ] ); diff --git a/inc/widgets-manager/widgets/site-logo/site-logo.php b/inc/widgets-manager/widgets/site-logo/site-logo.php index 150796d8e..1f4d83582 100644 --- a/inc/widgets-manager/widgets/site-logo/site-logo.php +++ b/inc/widgets-manager/widgets/site-logo/site-logo.php @@ -677,21 +677,21 @@ protected function register_site_logo_caption_styling_controls() { */ protected function register_pro_promotion_controls() { - if(! defined( 'UAEL_VER' )){ + if ( ! defined( 'UAEL_VER' ) ) { $this->start_controls_section( 'section_pro_features_field', - array( + [ 'label' => __( 'Go Pro for More Features', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'uae_pro_promotion_notice', [ - 'type' => Controls_Manager::NOTICE, + 'type' => Controls_Manager::NOTICE, 'notice_type' => 'info', 'dismissible' => false, - 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), + 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), ] ); diff --git a/inc/widgets-manager/widgets/site-tagline/site-tagline.php b/inc/widgets-manager/widgets/site-tagline/site-tagline.php index b477fe7a8..9390573af 100644 --- a/inc/widgets-manager/widgets/site-tagline/site-tagline.php +++ b/inc/widgets-manager/widgets/site-tagline/site-tagline.php @@ -261,21 +261,21 @@ protected function register_general_content_controls() { */ protected function register_pro_promotion_controls() { - if(! defined( 'UAEL_VER' )){ + if ( ! defined( 'UAEL_VER' ) ) { $this->start_controls_section( 'section_pro_features_field', - array( + [ 'label' => __( 'Go Pro for More Features', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'uae_pro_promotion_notice', [ - 'type' => Controls_Manager::NOTICE, + 'type' => Controls_Manager::NOTICE, 'notice_type' => 'info', 'dismissible' => false, - 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), + 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), ] ); diff --git a/inc/widgets-manager/widgets/site-title/site-title.php b/inc/widgets-manager/widgets/site-title/site-title.php index 4cea702b2..8b69b24b8 100644 --- a/inc/widgets-manager/widgets/site-title/site-title.php +++ b/inc/widgets-manager/widgets/site-title/site-title.php @@ -394,21 +394,21 @@ protected function register_heading_typo_content_controls(): void { */ protected function register_pro_promotion_controls() { - if(! defined( 'UAEL_VER' )){ + if ( ! defined( 'UAEL_VER' ) ) { $this->start_controls_section( 'section_pro_features_field', - array( + [ 'label' => __( 'Go Pro for More Features', 'header-footer-elementor' ), - ) + ] ); $this->add_control( 'uae_pro_promotion_notice', [ - 'type' => Controls_Manager::NOTICE, + 'type' => Controls_Manager::NOTICE, 'notice_type' => 'info', 'dismissible' => false, - 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), + 'content' => __( 'Build smarter and faster with premium widgets, 200+ section blocks, and advanced customisation controls — all available in the UAE Pro.', 'header-footer-elementor' ), ] ); From d4c7c0cdb139de9621e838f477fc27f308271827 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:19:24 +0530 Subject: [PATCH 10/39] updated github workflow 7 --- .github/workflows/ci.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccd7c0f69..1c2eff911 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,11 +56,4 @@ jobs: - name: PHP static analysis if: always() run: composer run phpstan - - - name: Lint JS - if: always() - run: npm run lint:js - - - name: Lint CSS - if: always() - run: npm run lint:css + From bd2d3e6bd81b246b716bc220a31007cf56309c5d Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:24:37 +0530 Subject: [PATCH 11/39] updated github workflow 8 --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c2eff911..c39e21b72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,9 @@ jobs: path: ~/.npm key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }} + - name: Install npm dependencies + run: npm install + - name: Setup PHP uses: shivammathur/setup-php@v2 with: From b7456236c7a9335a8dd0b263bc1c874c3328b64c Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:41:45 +0530 Subject: [PATCH 12/39] updated workflow file 8 --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c39e21b72..067f13ba6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,12 @@ jobs: tools: composer, cs2pr - name: Install composer dependencies - run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress + run: | + if [ -n "${{ secrets.PRIVATE_ACCESS_TOKEN }}" ]; then + composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} + fi + composer install --prefer-dist --no-suggest --no-progress + composer show | grep phpstan || echo "phpstan not found" - name: Run phpcs id: phpcs From ef45ec4c741047fea524140522a50fa4551b207e Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:48:23 +0530 Subject: [PATCH 13/39] updated workflow file 9 --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 067f13ba6..2b513c1d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,11 +46,20 @@ jobs: - name: Install composer dependencies run: | + echo "Installing dev dependencies only for CI..." if [ -n "${{ secrets.PRIVATE_ACCESS_TOKEN }}" ]; then + echo "Setting GitHub token..." composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} + composer install --prefer-dist --no-suggest --no-progress + else + echo "No GitHub token found, installing dev-only packages" + composer install --no-dev --prefer-dist --no-suggest --no-progress || true + composer require --dev squizlabs/php_codesniffer phpstan/phpstan --prefer-dist --no-progress fi - composer install --prefer-dist --no-suggest --no-progress - composer show | grep phpstan || echo "phpstan not found" + echo "Checking installed packages..." + ls -la vendor/bin/ || echo "vendor/bin directory not found" + which phpcs || echo "phpcs not in PATH" + which phpstan || echo "phpstan not in PATH" - name: Run phpcs id: phpcs From dc175273da1d416bdf77db485f5385e64eab3240 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:51:28 +0530 Subject: [PATCH 14/39] updated workflow file 10 --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b513c1d3..a28811196 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,9 +34,6 @@ jobs: path: ~/.npm key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }} - - name: Install npm dependencies - run: npm install - - name: Setup PHP uses: shivammathur/setup-php@v2 with: From 8d0366c3ac000c8b7c68424d2f99252240150d6b Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:56:38 +0530 Subject: [PATCH 15/39] updated github workflow files 11 --- .github/workflows/ci.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a28811196..e97aec8f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,20 +43,10 @@ jobs: - name: Install composer dependencies run: | - echo "Installing dev dependencies only for CI..." if [ -n "${{ secrets.PRIVATE_ACCESS_TOKEN }}" ]; then - echo "Setting GitHub token..." composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} - composer install --prefer-dist --no-suggest --no-progress - else - echo "No GitHub token found, installing dev-only packages" - composer install --no-dev --prefer-dist --no-suggest --no-progress || true - composer require --dev squizlabs/php_codesniffer phpstan/phpstan --prefer-dist --no-progress fi - echo "Checking installed packages..." - ls -la vendor/bin/ || echo "vendor/bin directory not found" - which phpcs || echo "phpcs not in PATH" - which phpstan || echo "phpstan not in PATH" + composer install --prefer-dist --no-progress - name: Run phpcs id: phpcs From f95ed52003a311e8c23d4d2c583ecd00512cee64 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:58:10 +0530 Subject: [PATCH 16/39] updated github workflow files 12 --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e97aec8f0..4491af462 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,10 +43,9 @@ jobs: - name: Install composer dependencies run: | - if [ -n "${{ secrets.PRIVATE_ACCESS_TOKEN }}" ]; then - composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} - fi - composer install --prefer-dist --no-progress + composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer install --ignore-platform-reqs --no-interaction || composer install --no-dev --ignore-platform-reqs --no-interaction + composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction - name: Run phpcs id: phpcs From cbf9fbaf6782274aaa0ee986247cc1708f58708c Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 12:59:52 +0530 Subject: [PATCH 17/39] updated github workflow files 13 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4491af462..37c60914d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,5 +58,5 @@ jobs: - name: PHP static analysis if: always() - run: composer run phpstan + run: composer phpstan From 15ce0324485a64272aa9a32e22cda0f30df4d2de Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:04:07 +0530 Subject: [PATCH 18/39] updated github workflow files 14 --- .github/workflows/ci.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37c60914d..d4db63401 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,16 +47,18 @@ jobs: composer install --ignore-platform-reqs --no-interaction || composer install --no-dev --ignore-platform-reqs --no-interaction composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction - - name: Run phpcs - id: phpcs + - name: PHPCS check if: always() - run: ./vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml - - - name: Show PHPCS results in PR - if: ${{ always() && steps.phpcs.outcome == 'failure' }} - run: cs2pr ./phpcs-report.xml + uses: chekalsky/phpcs-action@v1 + with: + phpcs_bin_path: './vendor/bin/phpcs' - name: PHP static analysis if: always() run: composer phpstan - + + - name: Lint JS + run: npm run lint:js + + - name: Lint CSS + run: npm run lint:css From d50aa880f78a88d66d6f4151066af3255e6da2ab Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:06:08 +0530 Subject: [PATCH 19/39] updated github workflow files 15 --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4db63401..2effe5ff0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,10 +53,6 @@ jobs: with: phpcs_bin_path: './vendor/bin/phpcs' - - name: PHP static analysis - if: always() - run: composer phpstan - - name: Lint JS run: npm run lint:js From 61f25f89de52c9760dd1d46e5c3fc14babb13a9a Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:08:31 +0530 Subject: [PATCH 20/39] updated github workflow files 16 --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2effe5ff0..be612a666 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,10 +42,7 @@ jobs: tools: composer, cs2pr - name: Install composer dependencies - run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} - composer install --ignore-platform-reqs --no-interaction || composer install --no-dev --ignore-platform-reqs --no-interaction - composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction + run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress - name: PHPCS check if: always() From 567176bf1143c1a8f50fa5b0017c04670e8e9b32 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:11:08 +0530 Subject: [PATCH 21/39] updated github workflow files 17 --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be612a666..b2b19817d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,13 +42,15 @@ jobs: tools: composer, cs2pr - name: Install composer dependencies - run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress + run: | + composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer install --ignore-platform-reqs --no-interaction || true + composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction + ls -la vendor/bin/ - name: PHPCS check if: always() - uses: chekalsky/phpcs-action@v1 - with: - phpcs_bin_path: './vendor/bin/phpcs' + run: ./vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml - name: Lint JS run: npm run lint:js From 2da82173bc18d7e2e032d539f146568ca865cb56 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:13:16 +0530 Subject: [PATCH 22/39] updated github workflow files 18 --- .github/workflows/ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2b19817d..6b6507bd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,10 +50,21 @@ jobs: - name: PHPCS check if: always() - run: ./vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml + uses: chekalsky/phpcs-action@v1 + with: + phpcs_bin_path: './vendor/bin/phpcs' + + - name: Use desired version of NodeJS + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: 'npm' - name: Lint JS run: npm run lint:js + + - name: Build project + run: npm run build - name: Lint CSS run: npm run lint:css From 277748d579de62caf5a89fb2e888dcfcee44a93d Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:14:37 +0530 Subject: [PATCH 23/39] updated github workflow files 19 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b6507bd6..27eac7453 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: PHPCS check if: always() - uses: chekalsky/phpcs-action@v1 + uses: chekalsky/phpcs-action@v4 with: phpcs_bin_path: './vendor/bin/phpcs' From 78c82f435747dbcea2bf348bd543aef8d3eeb4cf Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:17:10 +0530 Subject: [PATCH 24/39] updated github workflow files 20 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27eac7453..5e3d3e3ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: PHPCS check if: always() - uses: chekalsky/phpcs-action@v4 + uses: chekalsky/phpcs-action@v2 with: phpcs_bin_path: './vendor/bin/phpcs' From 341cf9a3f69d6af3a58154153a7508f4c865ddcb Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Wed, 17 Sep 2025 13:25:02 +0530 Subject: [PATCH 25/39] Updated github workflow files 21 --- .github/workflows/ci.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e3d3e3ae..1ca7a9481 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,70 +1,57 @@ name: Code Analysis - on: pull_request - # Cancels all previous workflow runs for pull requests that have not completed. concurrency: # The concurrency group contains the workflow name and the branch name for pull requests # or the commit hash for any other events. group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true - jobs: analysis: runs-on: ubuntu-latest - strategy: matrix: node: [ 18.15.0 ] php: ['7.4', '8.1'] - steps: - name: Checkout uses: actions/checkout@v4 - - name: Use desired version of NodeJS uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - - name: Cache NPM packages uses: actions/cache@v4 with: # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }} - - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} coverage: none tools: composer, cs2pr - - name: Install composer dependencies run: | composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} composer install --ignore-platform-reqs --no-interaction || true composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction ls -la vendor/bin/ - - name: PHPCS check if: always() - uses: chekalsky/phpcs-action@v2 + uses: chekalsky/phpcs-action@v1 with: phpcs_bin_path: './vendor/bin/phpcs' - - name: Use desired version of NodeJS uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} cache: 'npm' - - name: Lint JS run: npm run lint:js - name: Build project run: npm run build - - name: Lint CSS run: npm run lint:css From 992225c3799eefa81db6a41a56c25d6e2794c368 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:27:47 +0530 Subject: [PATCH 26/39] updated github workflow files 21 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e3d3e3ae..651135c1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: node: [ 18.15.0 ] - php: ['7.4', '8.1'] + php: ['7.4'] steps: - name: Checkout @@ -50,7 +50,7 @@ jobs: - name: PHPCS check if: always() - uses: chekalsky/phpcs-action@v2 + uses: chekalsky/phpcs-action@v1 with: phpcs_bin_path: './vendor/bin/phpcs' From 3f4f6ce25f761618377d69bccec382fc07d6627f Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:29:44 +0530 Subject: [PATCH 27/39] updated github workflow files 22 --- .github/workflows/ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 651135c1a..5f2aeb22a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: node: [ 18.15.0 ] - php: ['7.4'] + php: ['7.4', '8.0', '8.1',] steps: - name: Checkout @@ -42,11 +42,8 @@ jobs: tools: composer, cs2pr - name: Install composer dependencies - run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} - composer install --ignore-platform-reqs --no-interaction || true - composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction - ls -la vendor/bin/ + run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress + - name: PHPCS check if: always() From 00a10dcdcd84bbfe8ab02b3ed48308c73f479f46 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:31:10 +0530 Subject: [PATCH 28/39] updated github workflow files 23 --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f2aeb22a..0b8c1d092 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,6 @@ jobs: - name: Install composer dependencies run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress - - name: PHPCS check if: always() uses: chekalsky/phpcs-action@v1 From cfc56a5c42fd690e8ff7ecd34c1b90ed24fba8fb Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:38:23 +0530 Subject: [PATCH 29/39] updated github workflow files 25 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4960707b3..b96b2724f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ 18.15.0 ] - php: ['7.4', '8.1'] + node: [ 14.15 ] + php: ['7.4'] steps: - name: Checkout uses: actions/checkout@v4 From 5d96bdb4a5b890478148df68071d816b17aec137 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Wed, 17 Sep 2025 13:40:29 +0530 Subject: [PATCH 30/39] Updated file to test --- .github/workflows/ci.yml | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b96b2724f..7decfc7de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,54 +1,61 @@ name: Code Analysis on: pull_request + # Cancels all previous workflow runs for pull requests that have not completed. concurrency: - # The concurrency group contains the workflow name and the branch name for pull requests - # or the commit hash for any other events. group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true + jobs: analysis: runs-on: ubuntu-latest strategy: matrix: - node: [ 14.15 ] - php: ['7.4'] + node: [ 18.15.0 ] + php: ['7.4', '8.1'] steps: - name: Checkout uses: actions/checkout@v4 + - name: Use desired version of NodeJS uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + - name: Cache NPM packages uses: actions/cache@v4 with: - # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }} + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} coverage: none tools: composer, cs2pr + - name: Install composer dependencies - run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress + run: | + composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer install --ignore-platform-reqs --no-interaction + composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction + ls -la vendor/bin/ - - name: PHPCS check - if: always() - uses: chekalsky/phpcs-action@v1 - with: - phpcs_bin_path: './vendor/bin/phpcs' - - name: Use desired version of NodeJS + - name: Run PHPCS with annotations + run: vendor/bin/phpcs -q --report=checkstyle | cs2pr + + - name: Use desired version of NodeJS (with cache) uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} - cache: 'npm' + node-version: ${{ matrix.node }} + cache: 'npm' + - name: Lint JS run: npm run lint:js - + - name: Build project run: npm run build + - name: Lint CSS run: npm run lint:css From 1d1fada577b0e6c2c12daf6c056600f9a0e50a9e Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:42:55 +0530 Subject: [PATCH 31/39] updated github workflow files 26 --- .github/workflows/ci.yml | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7decfc7de..14c1dda1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,61 +1,53 @@ name: Code Analysis on: pull_request - # Cancels all previous workflow runs for pull requests that have not completed. concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true - jobs: analysis: runs-on: ubuntu-latest strategy: matrix: - node: [ 18.15.0 ] - php: ['7.4', '8.1'] + node: [ 14.15 ] + php: ['7.4'] steps: - name: Checkout uses: actions/checkout@v4 - - name: Use desired version of NodeJS uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - - name: Cache NPM packages uses: actions/cache@v4 with: + # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }} - - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} coverage: none tools: composer, cs2pr - - name: Install composer dependencies - run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} - composer install --ignore-platform-reqs --no-interaction - composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction - ls -la vendor/bin/ + run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress - - name: Run PHPCS with annotations - run: vendor/bin/phpcs -q --report=checkstyle | cs2pr + - name: PHPCS check + if: always() + run: ./vendor/bin/phpcs --report=checkstyle | cs2pr - - name: Use desired version of NodeJS (with cache) + - name: Use desired version of NodeJS uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} - cache: 'npm' - + node-version: ${{ matrix.node }} + cache: 'npm' - name: Lint JS run: npm run lint:js - + - name: Build project run: npm run build - - name: Lint CSS run: npm run lint:css From d5efb5aa57683e239654133a92d2479e50b0c277 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:43:53 +0530 Subject: [PATCH 32/39] updated github workflow files 27 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14c1dda1f..43f75a5b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: - name: PHPCS check if: always() - run: ./vendor/bin/phpcs --report=checkstyle | cs2pr + run: ./vendor/bin/phpcs | cs2pr - name: Use desired version of NodeJS uses: actions/setup-node@v3 From 479811f52966be6f016ca174c509c59612c7c285 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 17 Sep 2025 13:46:57 +0530 Subject: [PATCH 33/39] updated github workflow files 26 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43f75a5b9..ef4394720 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: - name: PHPCS check if: always() - run: ./vendor/bin/phpcs | cs2pr + run: composer lint - name: Use desired version of NodeJS uses: actions/setup-node@v3 From a800f57165c807e22068bc3f5585c548836ccd39 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Wed, 17 Sep 2025 13:55:46 +0530 Subject: [PATCH 34/39] updated file --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef4394720..f3ba6caf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,53 +1,61 @@ -name: Code Analysis +\name: Code Analysis on: pull_request + # Cancels all previous workflow runs for pull requests that have not completed. concurrency: - # The concurrency group contains the workflow name and the branch name for pull requests - # or the commit hash for any other events. group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true + jobs: analysis: runs-on: ubuntu-latest strategy: matrix: - node: [ 14.15 ] - php: ['7.4'] + node: [ 18.15.0 ] + php: ['7.4', '8.1'] steps: - name: Checkout uses: actions/checkout@v4 + - name: Use desired version of NodeJS uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + - name: Cache NPM packages uses: actions/cache@v4 with: - # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }} + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} coverage: none tools: composer, cs2pr + - name: Install composer dependencies - run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress + run: | + composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer install --ignore-platform-reqs --no-interaction + composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction + ls -la vendor/bin/ - - name: PHPCS check - if: always() - run: composer lint + - name: Run PHPCS with annotations + run: vendor/bin/phpcs -q --report=checkstyle | cs2pr - - name: Use desired version of NodeJS + - name: Use desired version of NodeJS (with cache) uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} - cache: 'npm' + node-version: ${{ matrix.node }} + cache: 'npm' + - name: Lint JS run: npm run lint:js - + - name: Build project run: npm run build + - name: Lint CSS run: npm run lint:css From c515b68f500a5438e4245dae8204633808c9b68a Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Wed, 17 Sep 2025 13:57:32 +0530 Subject: [PATCH 35/39] remove / --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3ba6caf6..7decfc7de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -\name: Code Analysis +name: Code Analysis on: pull_request # Cancels all previous workflow runs for pull requests that have not completed. From a70f7dcb183c60e23d8077339c11e3a146527777 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Wed, 17 Sep 2025 14:03:03 +0530 Subject: [PATCH 36/39] skip private repo --- .github/workflows/ci.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7decfc7de..df2a2d7ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,6 @@ name: Code Analysis on: pull_request -# Cancels all previous workflow runs for pull requests that have not completed. concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} cancel-in-progress: true @@ -17,17 +16,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Use desired version of NodeJS - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - - - name: Cache NPM packages - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }} - - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -35,22 +23,24 @@ jobs: coverage: none tools: composer, cs2pr - - name: Install composer dependencies + - name: Install composer dependencies (CI safe) run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} - composer install --ignore-platform-reqs --no-interaction + composer install --ignore-platform-reqs --no-interaction --no-scripts --no-plugins composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction ls -la vendor/bin/ - name: Run PHPCS with annotations run: vendor/bin/phpcs -q --report=checkstyle | cs2pr - - name: Use desired version of NodeJS (with cache) - uses: actions/setup-node@v3 + - name: Setup NodeJS + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: 'npm' + - name: Install NPM dependencies + run: npm ci + - name: Lint JS run: npm run lint:js From 433b602f2c683e6c07a640ba9f689b3a36ea83ec Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Wed, 17 Sep 2025 14:06:27 +0530 Subject: [PATCH 37/39] fix composer --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df2a2d7ab..cefee479a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,11 +23,8 @@ jobs: coverage: none tools: composer, cs2pr - - name: Install composer dependencies (CI safe) - run: | - composer install --ignore-platform-reqs --no-interaction --no-scripts --no-plugins - composer require --dev squizlabs/php_codesniffer phpstan/phpstan --ignore-platform-reqs --no-interaction - ls -la vendor/bin/ + - name: Install composer dependencies + run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress - name: Run PHPCS with annotations run: vendor/bin/phpcs -q --report=checkstyle | cs2pr From 46667a2f01cefc261c54213ba951235c787e9d6d Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 15 Oct 2025 12:12:13 +0530 Subject: [PATCH 38/39] updated PHP Version --- .claude/settings.local.json | 10 --- .github/workflows/ci.yml | 2 +- composer.lock | 140 ++++++++++++++++++------------------ 3 files changed, 70 insertions(+), 82 deletions(-) delete mode 100644 .claude/settings.local.json diff --git a/.claude/settings.local.json b/.claude/settings.local.json deleted file mode 100644 index 6e0482acb..000000000 --- a/.claude/settings.local.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "permissions": { - "allow": [ - "Read(//Users/akshayurankar/Downloads/**)", - "Read(//Users/akshayurankar/Downloads/ultimate-addons-for-gutenberg-master/.github/**)" - ], - "deny": [], - "ask": [] - } -} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cefee479a..9d0a3e3bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: node: [ 18.15.0 ] - php: ['7.4', '8.1'] + php: ['8.1'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/composer.lock b/composer.lock index f69a06f61..b92492a85 100644 --- a/composer.lock +++ b/composer.lock @@ -667,16 +667,16 @@ }, { "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.3.3", + "version": "1.3.4", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac" + "reference": "244d7b04fc4bc2117c15f5abe23eb933b5f02bbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/293975b465e0e709b571cbf0c957c6c0a7b9a2ac", - "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/244d7b04fc4bc2117c15f5abe23eb933b5f02bbf", + "reference": "244d7b04fc4bc2117c15f5abe23eb933b5f02bbf", "shasum": "" }, "require": { @@ -733,9 +733,13 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcompatibility", + "type": "thanks_dev" } ], - "time": "2024-04-24T21:30:46+00:00" + "time": "2025-09-19T17:43:28+00:00" }, { "name": "phpcompatibility/phpcompatibility-wp", @@ -814,16 +818,11 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.29", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "0835c625a38ac6484f050077116b6668bc3ab57d" - }, + "version": "1.12.32", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0835c625a38ac6484f050077116b6668bc3ab57d", - "reference": "0835c625a38ac6484f050077116b6668bc3ab57d", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8", + "reference": "2770dcdf5078d0b0d53f94317e06affe88419aa8", "shasum": "" }, "require": { @@ -868,7 +867,7 @@ "type": "github" } ], - "time": "2025-09-16T08:46:57+00:00" + "time": "2025-09-30T10:16:31+00:00" }, { "name": "psr/container", @@ -925,28 +924,27 @@ }, { "name": "sirbrillig/phpcs-variable-analysis", - "version": "v2.12.0", + "version": "v2.13.0", "source": { "type": "git", "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", - "reference": "4debf5383d9ade705e0a25121f16c3fecaf433a7" + "reference": "a15e970b8a0bf64cfa5e86d941f5e6b08855f369" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/4debf5383d9ade705e0a25121f16c3fecaf433a7", - "reference": "4debf5383d9ade705e0a25121f16c3fecaf433a7", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/a15e970b8a0bf64cfa5e86d941f5e6b08855f369", + "reference": "a15e970b8a0bf64cfa5e86d941f5e6b08855f369", "shasum": "" }, "require": { "php": ">=5.4.0", - "squizlabs/php_codesniffer": "^3.5.6" + "squizlabs/php_codesniffer": "^3.5.7 || ^4.0.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0", - "phpcsstandards/phpcsdevcs": "^1.1", - "phpstan/phpstan": "^1.7", + "phpstan/phpstan": "^1.7 || ^2.0", "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0 || ^10.5.32 || ^11.3.3", - "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0" + "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0 || ^6.0 || ^7.0" }, "type": "phpcodesniffer-standard", "autoload": { @@ -978,7 +976,7 @@ "source": "https://github.com/sirbrillig/phpcs-variable-analysis", "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" }, - "time": "2025-03-17T16:17:38+00:00" + "time": "2025-09-30T22:22:48+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -1066,47 +1064,47 @@ }, { "name": "symfony/console", - "version": "v6.4.25", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "273fd29ff30ba0a88ca5fb83f7cf1ab69306adae" + "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/273fd29ff30ba0a88ca5fb83f7cf1ab69306adae", - "reference": "273fd29ff30ba0a88ca5fb83f7cf1ab69306adae", + "url": "https://api.github.com/repos/symfony/console/zipball/2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", + "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0|^7.0" + "symfony/string": "^7.2" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1140,7 +1138,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.25" + "source": "https://github.com/symfony/console/tree/v7.3.4" }, "funding": [ { @@ -1160,7 +1158,7 @@ "type": "tidelift" } ], - "time": "2025-08-22T10:21:53+00:00" + "time": "2025-09-22T15:31:00+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1231,25 +1229,25 @@ }, { "name": "symfony/filesystem", - "version": "v6.4.24", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "75ae2edb7cdcc0c53766c30b0a2512b8df574bd8" + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/75ae2edb7cdcc0c53766c30b0a2512b8df574bd8", - "reference": "75ae2edb7cdcc0c53766c30b0a2512b8df574bd8", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^5.4|^6.4|^7.0" + "symfony/process": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1277,7 +1275,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.4.24" + "source": "https://github.com/symfony/filesystem/tree/v7.3.2" }, "funding": [ { @@ -1297,27 +1295,27 @@ "type": "tidelift" } ], - "time": "2025-07-10T08:14:14+00:00" + "time": "2025-07-07T08:17:47+00:00" }, { "name": "symfony/finder", - "version": "v6.4.24", + "version": "v7.3.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "73089124388c8510efb8d2d1689285d285937b08" + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/73089124388c8510efb8d2d1689285d285937b08", - "reference": "73089124388c8510efb8d2d1689285d285937b08", + "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", + "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0|^7.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1345,7 +1343,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.24" + "source": "https://github.com/symfony/finder/tree/v7.3.2" }, "funding": [ { @@ -1365,7 +1363,7 @@ "type": "tidelift" } ], - "time": "2025-07-15T12:02:45+00:00" + "time": "2025-07-15T13:41:35+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1867,20 +1865,20 @@ }, { "name": "symfony/string", - "version": "v6.4.25", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "7cdec7edfaf2cdd9c18901e35bcf9653d6209ff1" + "reference": "f96476035142921000338bad71e5247fbc138872" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/7cdec7edfaf2cdd9c18901e35bcf9653d6209ff1", - "reference": "7cdec7edfaf2cdd9c18901e35bcf9653d6209ff1", + "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", + "reference": "f96476035142921000338bad71e5247fbc138872", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -1890,11 +1888,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/intl": "^6.2|^7.0", + "symfony/emoji": "^7.1", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0|^7.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1933,7 +1931,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.25" + "source": "https://github.com/symfony/string/tree/v7.3.4" }, "funding": [ { @@ -1953,7 +1951,7 @@ "type": "tidelift" } ], - "time": "2025-08-22T12:33:20+00:00" + "time": "2025-09-11T14:36:48+00:00" }, { "name": "szepeviktor/phpstan-wordpress", From 4261f117bce3a205f39f3070905a62991dea7e94 Mon Sep 17 00:00:00 2001 From: Akshay Urankar Date: Wed, 15 Oct 2025 12:44:59 +0530 Subject: [PATCH 39/39] updated PHP Version 2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d0a3e3bb..4bf23ba36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: node: [ 18.15.0 ] - php: ['8.1'] + php: ['8.1', '8.2'] steps: - name: Checkout uses: actions/checkout@v4