From 8bf8450db5e613ca7c1ce73b4f1ff431a0918d70 Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Thu, 23 Feb 2023 15:55:16 +0530 Subject: [PATCH 01/31] updating the correct release date --- CHANGELOG.md | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51a71f6d..6e74a3b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD -## [2.7.4] - 2023-02-17 +## [2.7.4] - 2023-02-23 ### Fixed - Support passing `WP_User` to `get_avatar()` (props [@mattheu](https://github.com/mattheu), [@faisal-alvi](https://github.com/faisal-alvi) via [#193](https://github.com/10up/simple-local-avatars/pull/193)). - Remove trailing commas in function calls (props [@patrixer](https://github.com/patrixer), [@dkotter](https://github.com/dkotter), [@sekra24](https://github.com/sekra24), [@faisal-alvi](https://github.com/faisal-alvi) via [#196](https://github.com/10up/simple-local-avatars/pull/196)). diff --git a/readme.txt b/readme.txt index a659ea8c..86e5b4cd 100644 --- a/readme.txt +++ b/readme.txt @@ -41,7 +41,7 @@ You can also use `get_simple_local_avatar()` (with the same arguments) to retrei == Changelog == -= 2.7.4 - 2023-02-17 = += 2.7.4 - 2023-02-23 = * **Fixed:** Support passing `WP_User` to `get_avatar()` (props [@mattheu](https://github.com/mattheu), [@faisal-alvi](https://github.com/faisal-alvi) via [#193](https://github.com/10up/simple-local-avatars/pull/193)). * **Fixed:** Remove trailing commas in function calls (props [@patrixer](https://github.com/patrixer), [@dkotter](https://github.com/dkotter), [@sekra24](https://github.com/sekra24), [@faisal-alvi](https://github.com/faisal-alvi) via [#196](https://github.com/10up/simple-local-avatars/pull/196)). * **Security:** Bump `simple-git` from 3.15.1 to 3.16.0 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#191](https://github.com/10up/simple-local-avatars/pull/191)). From e41a23ff53ca99f93d4a396dbcbb1d6849711d5b Mon Sep 17 00:00:00 2001 From: Bunty Date: Sun, 5 Mar 2023 13:57:13 +0530 Subject: [PATCH 02/31] Feature #200 - Display loader for ajax process --- assets/js/simple-local-avatars.js | 6 ++++++ includes/class-simple-local-avatars.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/js/simple-local-avatars.js b/assets/js/simple-local-avatars.js index a20effc0..03cb906a 100644 --- a/assets/js/simple-local-avatars.js +++ b/assets/js/simple-local-avatars.js @@ -307,10 +307,16 @@ function avatar_lock(lock_or_unlock) { avatar_working = false; avatar_form_button.removeAttr('disabled'); avatar_spinner.hide(); + if ( avatar_spinner.hasClass( 'is-active' ) ) { + avatar_spinner.removeClass( 'is-active' ); + } } else { avatar_working = true; avatar_form_button.attr('disabled', 'disabled'); avatar_spinner.show(); + if ( ! avatar_spinner.hasClass( 'is-active' ) ) { + avatar_spinner.addClass( 'is-active' ); + } } } diff --git a/includes/class-simple-local-avatars.php b/includes/class-simple-local-avatars.php index 2148b696..f172098a 100644 --- a/includes/class-simple-local-avatars.php +++ b/includes/class-simple-local-avatars.php @@ -918,16 +918,16 @@ public function edit_user_profile( $profileuser ) {


-

-

+

  simple_local_avatar ) ? ' style="display:none;"' : ''; ?>> +

Date: Wed, 8 Mar 2023 21:37:41 +0600 Subject: [PATCH 03/31] E2E test on build zip --- .github/workflows/build-release-zip.yml | 1 + .github/workflows/cypress.yml | 25 ++++++++++++-- tests/bin/set-core-version.js | 31 ----------------- tests/bin/set-wp-config.js | 46 +++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 33 deletions(-) delete mode 100755 tests/bin/set-core-version.js create mode 100755 tests/bin/set-wp-config.js diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index 586e6aae..c8427567 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -2,6 +2,7 @@ name: Build release zip on: workflow_dispatch: + workflow_call: push: branches: - trunk diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index b7949824..a2398321 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -5,6 +5,8 @@ on: branches: - develop jobs: + build: + uses: 10up/simple-local-avatars/.github/workflows/build-release-zip.yml@update/181 # TODO: Update this to develop branch before merge. cypress: name: ${{ matrix.core.name }} runs-on: ubuntu-latest @@ -17,6 +19,25 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Download build zip + uses: actions/download-artifact@v3 + with: + name: ${{ github.event.repository.name }} + path: ${{ github.event.repository.name }} + - name: Display structure of downloaded files + run: ls -R + working-directory: ${{ github.event.repository.name }} + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: | + node_modules + ~/.cache + ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: Install dependencies run: npm install - name: Composer (optional) @@ -25,8 +46,8 @@ jobs: - name: Build (optional) run: npm run build continue-on-error: true - - name: Set the core version - run: ./tests/bin/set-core-version.js ${{ matrix.core.version }} + - name: Set the core version and plugins config + run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }} - name: Set up WP environment run: npm run env:start - name: Test diff --git a/tests/bin/set-core-version.js b/tests/bin/set-core-version.js deleted file mode 100755 index 2242d03e..00000000 --- a/tests/bin/set-core-version.js +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env node - -const fs = require("fs"); -const { exit } = require("process"); - -const path = `${process.cwd()}/.wp-env.override.json`; - -let config = fs.existsSync(path) ? require(path) : {}; - -const args = process.argv.slice(2); - -if (args.length == 0) exit(0); - -if (args[0] == "latest") { - if (fs.existsSync(path)) { - fs.unlinkSync(path); - } - exit(0); -} - -config.core = args[0]; - -if (!config.core.match(/^WordPress\/WordPress\#/)) { - config.core = "WordPress/WordPress#" + config.core; -} - -try { - fs.writeFileSync(path, JSON.stringify(config)); -} catch (err) { - console.error(err); -} diff --git a/tests/bin/set-wp-config.js b/tests/bin/set-wp-config.js new file mode 100755 index 00000000..fdcc3c43 --- /dev/null +++ b/tests/bin/set-wp-config.js @@ -0,0 +1,46 @@ +#!/usr/bin/env node + +const fs = require( 'fs' ); + +const path = `${ process.cwd() }/.wp-env.json`; + +let config = fs.existsSync( path ) ? require( path ) : { plugins: [ '.' ] }; + +const args = {}; +process.argv + .slice(2, process.argv.length) + .forEach( arg => { + if (arg.slice(0,2) === '--') { + const param = arg.split('='); + const paramName = param[0].slice(2,param[0].length); + const paramValue = param.length > 1 ? param[1] : true; + args[paramName] = paramValue; + } + }); + +if ( ! args.core && ! args.plugins ) { + return; +} + +if ( 'latest' === args.core ) { + delete args.core; +} + +if( Object.keys(args).length === 0 ) { + return; +} + +if ( args.plugins ) { + args.plugins = args.plugins.split(','); +} + +config = { + ...config, + ...args, +} + +try { + fs.writeFileSync( path, JSON.stringify( config ) ); +} catch ( err ) { + console.error( err ); +} From dd947cdd29c605930c000350438813ad2fe28f52 Mon Sep 17 00:00:00 2001 From: JK Date: Wed, 8 Mar 2023 21:46:56 +0600 Subject: [PATCH 04/31] Build release update --- .github/workflows/build-release-zip.yml | 24 +----------------------- .phpunit.result.cache | 1 + 2 files changed, 2 insertions(+), 23 deletions(-) create mode 100644 .phpunit.result.cache diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index c8427567..d3b5a06a 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -14,28 +14,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - - - name: Setup node version and npm cache - uses: actions/setup-node@v3 - with: - node-version: 16 - cache: 'npm' - - - name: Install Node dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm install - - - name: Build plugin - run: npm run build - + - name: Generate ZIP file uses: 10up/action-wordpress-plugin-build-zip@stable diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 00000000..3167c19a --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +{"version":1,"defects":{"SimpleLocalAvatarsTest::test_assign_new_user_avatar":4,"SimpleLocalAvatarsTest::test_avatar_delete":4},"times":{"SimpleLocalAvatarsTest::test_add_hooks":0.072,"SimpleLocalAvatarsTest::test_is_network":0.002,"SimpleLocalAvatarsTest::test_get_network_mode":0.001,"SimpleLocalAvatarsTest::test_is_enforced":0,"SimpleLocalAvatarsTest::test_is_avatar_shared":0,"SimpleLocalAvatarsTest::test_get_avatar":0.001,"SimpleLocalAvatarsTest::test_plugin_filter_action_links":0.004,"SimpleLocalAvatarsTest::test_get_avatar_data":0.001,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_with_empty_id":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_user_with_no_avatar":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_media_file_deleted":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_override":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_no_override":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_default_avatar_without_alt":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_default_avatar_with_alt":0,"SimpleLocalAvatarsTest::test_admin_init":0.001,"SimpleLocalAvatarsTest::test_load_discussion_page":0,"SimpleLocalAvatarsTest::test_enqueue_scripts_wrong_screen":0,"SimpleLocalAvatarsTest::test_sanitize_options":0.001,"SimpleLocalAvatarsTest::test_get_default_avatar_url":0,"SimpleLocalAvatarsTest::test_avatar_settings_field":0,"SimpleLocalAvatarsTest::test_edit_user_profile":0.001,"SimpleLocalAvatarsTest::test_assign_new_user_avatar":0.001,"SimpleLocalAvatarsTest::test_edit_user_profile_update":0,"SimpleLocalAvatarsTest::test_action_remove_simple_local_avatar":0,"SimpleLocalAvatarsTest::test_unique_filename_callback":0,"SimpleLocalAvatarsTest::test_get_avatar_rest":0,"SimpleLocalAvatarsTest::test_user_edit_form_tag":0,"SimpleLocalAvatarsTest::test_upload_size_limit":0,"SimpleLocalAvatarsTest::test_avatar_delete":0,"SimpleLocalAvatarsTest::test_get_user_id":0.012}} \ No newline at end of file From a022f5a0f068d3914454626d999b5cc57fc06362 Mon Sep 17 00:00:00 2001 From: JK Date: Wed, 8 Mar 2023 22:05:07 +0600 Subject: [PATCH 05/31] Build dependency fix --- .github/workflows/cypress.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index a2398321..813a4548 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -8,6 +8,7 @@ jobs: build: uses: 10up/simple-local-avatars/.github/workflows/build-release-zip.yml@update/181 # TODO: Update this to develop branch before merge. cypress: + needs: build name: ${{ matrix.core.name }} runs-on: ubuntu-latest strategy: From f43ad72ea5800edbf3fec8a39eedc68764c5ecca Mon Sep 17 00:00:00 2001 From: JK Date: Wed, 8 Mar 2023 22:20:28 +0600 Subject: [PATCH 06/31] Build dependency fix --- .github/workflows/cypress.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 813a4548..38a2128a 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -44,9 +44,6 @@ jobs: - name: Composer (optional) run: composer install continue-on-error: true - - name: Build (optional) - run: npm run build - continue-on-error: true - name: Set the core version and plugins config run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }} - name: Set up WP environment From f5c3850680bf38534f966699b3202aac5693a14b Mon Sep 17 00:00:00 2001 From: Bunty Date: Sun, 12 Mar 2023 11:50:56 +0530 Subject: [PATCH 07/31] Feature #200 - Display loader inplace of avatar --- assets/js/simple-local-avatars.js | 1 + includes/class-simple-local-avatars.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/simple-local-avatars.js b/assets/js/simple-local-avatars.js index 03cb906a..3a133e93 100644 --- a/assets/js/simple-local-avatars.js +++ b/assets/js/simple-local-avatars.js @@ -314,6 +314,7 @@ function avatar_lock(lock_or_unlock) { avatar_working = true; avatar_form_button.attr('disabled', 'disabled'); avatar_spinner.show(); + jQuery(avatar_container).html( avatar_spinner ); if ( ! avatar_spinner.hasClass( 'is-active' ) ) { avatar_spinner.addClass( 'is-active' ); } diff --git a/includes/class-simple-local-avatars.php b/includes/class-simple-local-avatars.php index f172098a..4ab99924 100644 --- a/includes/class-simple-local-avatars.php +++ b/includes/class-simple-local-avatars.php @@ -890,6 +890,7 @@ public function edit_user_profile( $profileuser ) { echo wp_kses_post( get_simple_local_avatar( $profileuser->ID ) ); remove_filter( 'pre_option_avatar_rating', '__return_empty_string' ); ?> + " class="button item-delete submitdelete deletion" id="simple-local-avatar-remove" simple_local_avatar ) ? ' style="display:none;"' : ''; ?>> -

Date: Wed, 15 Mar 2023 09:56:56 +0000 Subject: [PATCH 08/31] build(deps): bump webpack from 5.75.0 to 5.76.1 Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.1) --- updated-dependencies: - dependency-name: webpack dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b168632a..40c79755 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18303,9 +18303,9 @@ } }, "node_modules/webpack": { - "version": "5.75.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", - "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "version": "5.76.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz", + "integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", @@ -32858,9 +32858,9 @@ "dev": true }, "webpack": { - "version": "5.75.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", - "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "version": "5.76.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz", + "integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", From b7e4071ac0e1ff3900765ba0af9795f6032e3cdf Mon Sep 17 00:00:00 2001 From: JK Date: Mon, 20 Mar 2023 21:20:14 +0600 Subject: [PATCH 09/31] Build release file restore --- .github/workflows/build-release-zip.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index d3b5a06a..1f748911 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -15,5 +15,27 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + + - name: Setup node version and npm cache + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + + - name: Install Node dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm install + + - name: Build plugin + run: npm run build + - name: Generate ZIP file uses: 10up/action-wordpress-plugin-build-zip@stable From 4caa9f0f1b74a1bbe4145be0389741196a5197b0 Mon Sep 17 00:00:00 2001 From: Jayedul K Date: Mon, 20 Mar 2023 21:38:27 +0600 Subject: [PATCH 10/31] Delete .phpunit.result.cache --- .phpunit.result.cache | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .phpunit.result.cache diff --git a/.phpunit.result.cache b/.phpunit.result.cache deleted file mode 100644 index 3167c19a..00000000 --- a/.phpunit.result.cache +++ /dev/null @@ -1 +0,0 @@ -{"version":1,"defects":{"SimpleLocalAvatarsTest::test_assign_new_user_avatar":4,"SimpleLocalAvatarsTest::test_avatar_delete":4},"times":{"SimpleLocalAvatarsTest::test_add_hooks":0.072,"SimpleLocalAvatarsTest::test_is_network":0.002,"SimpleLocalAvatarsTest::test_get_network_mode":0.001,"SimpleLocalAvatarsTest::test_is_enforced":0,"SimpleLocalAvatarsTest::test_is_avatar_shared":0,"SimpleLocalAvatarsTest::test_get_avatar":0.001,"SimpleLocalAvatarsTest::test_plugin_filter_action_links":0.004,"SimpleLocalAvatarsTest::test_get_avatar_data":0.001,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_with_empty_id":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_user_with_no_avatar":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_media_file_deleted":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_override":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_no_override":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_default_avatar_without_alt":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_default_avatar_with_alt":0,"SimpleLocalAvatarsTest::test_admin_init":0.001,"SimpleLocalAvatarsTest::test_load_discussion_page":0,"SimpleLocalAvatarsTest::test_enqueue_scripts_wrong_screen":0,"SimpleLocalAvatarsTest::test_sanitize_options":0.001,"SimpleLocalAvatarsTest::test_get_default_avatar_url":0,"SimpleLocalAvatarsTest::test_avatar_settings_field":0,"SimpleLocalAvatarsTest::test_edit_user_profile":0.001,"SimpleLocalAvatarsTest::test_assign_new_user_avatar":0.001,"SimpleLocalAvatarsTest::test_edit_user_profile_update":0,"SimpleLocalAvatarsTest::test_action_remove_simple_local_avatar":0,"SimpleLocalAvatarsTest::test_unique_filename_callback":0,"SimpleLocalAvatarsTest::test_get_avatar_rest":0,"SimpleLocalAvatarsTest::test_user_edit_form_tag":0,"SimpleLocalAvatarsTest::test_upload_size_limit":0,"SimpleLocalAvatarsTest::test_avatar_delete":0,"SimpleLocalAvatarsTest::test_get_user_id":0.012}} \ No newline at end of file From a57873a745077cb6dbb4bfb89cee58341c674ed3 Mon Sep 17 00:00:00 2001 From: Faisal Alvi Date: Tue, 21 Mar 2023 16:26:40 +0530 Subject: [PATCH 11/31] Update .github/workflows/build-release-zip.yml --- .github/workflows/build-release-zip.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index 1f748911..809f2b1a 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -14,7 +14,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Cache node_modules id: cache-node-modules uses: actions/cache@v3 From 641fcbe50f0a8431ff5276e9cc3ef74e13a5f192 Mon Sep 17 00:00:00 2001 From: Faisal Alvi Date: Tue, 21 Mar 2023 16:26:57 +0530 Subject: [PATCH 12/31] Update .github/workflows/cypress.yml --- .github/workflows/cypress.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 38a2128a..a76f61cc 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -6,7 +6,7 @@ on: - develop jobs: build: - uses: 10up/simple-local-avatars/.github/workflows/build-release-zip.yml@update/181 # TODO: Update this to develop branch before merge. + uses: 10up/simple-local-avatars/.github/workflows/build-release-zip.yml@develop cypress: needs: build name: ${{ matrix.core.name }} From 64e6416734c91c571a5b5ce21ab92cb0d6548885 Mon Sep 17 00:00:00 2001 From: JK Date: Thu, 23 Mar 2023 15:45:56 +0600 Subject: [PATCH 13/31] Avatar removal text update --- includes/class-simple-local-avatars.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-simple-local-avatars.php b/includes/class-simple-local-avatars.php index 2148b696..cba4f822 100644 --- a/includes/class-simple-local-avatars.php +++ b/includes/class-simple-local-avatars.php @@ -926,7 +926,7 @@ public function edit_user_profile( $profileuser ) {   simple_local_avatar ) ? ' style="display:none;"' : ''; ?>> - +

Date: Wed, 15 Mar 2023 09:56:56 +0000 Subject: [PATCH 14/31] build(deps): bump webpack from 5.75.0 to 5.76.1 Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.1) --- updated-dependencies: - dependency-name: webpack dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b168632a..40c79755 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18303,9 +18303,9 @@ } }, "node_modules/webpack": { - "version": "5.75.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", - "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "version": "5.76.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz", + "integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", @@ -32858,9 +32858,9 @@ "dev": true }, "webpack": { - "version": "5.75.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", - "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "version": "5.76.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz", + "integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", From 1350037d25ed0fe53c583069ae8de1d20ea03fb6 Mon Sep 17 00:00:00 2001 From: JK Date: Wed, 8 Mar 2023 21:37:41 +0600 Subject: [PATCH 15/31] E2E test on build zip --- .github/workflows/build-release-zip.yml | 1 + .github/workflows/cypress.yml | 25 ++++++++++++-- tests/bin/set-core-version.js | 31 ----------------- tests/bin/set-wp-config.js | 46 +++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 33 deletions(-) delete mode 100755 tests/bin/set-core-version.js create mode 100755 tests/bin/set-wp-config.js diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index 586e6aae..c8427567 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -2,6 +2,7 @@ name: Build release zip on: workflow_dispatch: + workflow_call: push: branches: - trunk diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index b7949824..a2398321 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -5,6 +5,8 @@ on: branches: - develop jobs: + build: + uses: 10up/simple-local-avatars/.github/workflows/build-release-zip.yml@update/181 # TODO: Update this to develop branch before merge. cypress: name: ${{ matrix.core.name }} runs-on: ubuntu-latest @@ -17,6 +19,25 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Download build zip + uses: actions/download-artifact@v3 + with: + name: ${{ github.event.repository.name }} + path: ${{ github.event.repository.name }} + - name: Display structure of downloaded files + run: ls -R + working-directory: ${{ github.event.repository.name }} + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: | + node_modules + ~/.cache + ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: Install dependencies run: npm install - name: Composer (optional) @@ -25,8 +46,8 @@ jobs: - name: Build (optional) run: npm run build continue-on-error: true - - name: Set the core version - run: ./tests/bin/set-core-version.js ${{ matrix.core.version }} + - name: Set the core version and plugins config + run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }} - name: Set up WP environment run: npm run env:start - name: Test diff --git a/tests/bin/set-core-version.js b/tests/bin/set-core-version.js deleted file mode 100755 index 2242d03e..00000000 --- a/tests/bin/set-core-version.js +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env node - -const fs = require("fs"); -const { exit } = require("process"); - -const path = `${process.cwd()}/.wp-env.override.json`; - -let config = fs.existsSync(path) ? require(path) : {}; - -const args = process.argv.slice(2); - -if (args.length == 0) exit(0); - -if (args[0] == "latest") { - if (fs.existsSync(path)) { - fs.unlinkSync(path); - } - exit(0); -} - -config.core = args[0]; - -if (!config.core.match(/^WordPress\/WordPress\#/)) { - config.core = "WordPress/WordPress#" + config.core; -} - -try { - fs.writeFileSync(path, JSON.stringify(config)); -} catch (err) { - console.error(err); -} diff --git a/tests/bin/set-wp-config.js b/tests/bin/set-wp-config.js new file mode 100755 index 00000000..fdcc3c43 --- /dev/null +++ b/tests/bin/set-wp-config.js @@ -0,0 +1,46 @@ +#!/usr/bin/env node + +const fs = require( 'fs' ); + +const path = `${ process.cwd() }/.wp-env.json`; + +let config = fs.existsSync( path ) ? require( path ) : { plugins: [ '.' ] }; + +const args = {}; +process.argv + .slice(2, process.argv.length) + .forEach( arg => { + if (arg.slice(0,2) === '--') { + const param = arg.split('='); + const paramName = param[0].slice(2,param[0].length); + const paramValue = param.length > 1 ? param[1] : true; + args[paramName] = paramValue; + } + }); + +if ( ! args.core && ! args.plugins ) { + return; +} + +if ( 'latest' === args.core ) { + delete args.core; +} + +if( Object.keys(args).length === 0 ) { + return; +} + +if ( args.plugins ) { + args.plugins = args.plugins.split(','); +} + +config = { + ...config, + ...args, +} + +try { + fs.writeFileSync( path, JSON.stringify( config ) ); +} catch ( err ) { + console.error( err ); +} From 7556b0fb166e51ed53d20cb37b7ed0e705b96e71 Mon Sep 17 00:00:00 2001 From: JK Date: Wed, 8 Mar 2023 21:46:56 +0600 Subject: [PATCH 16/31] Build release update --- .github/workflows/build-release-zip.yml | 24 +----------------------- .phpunit.result.cache | 1 + 2 files changed, 2 insertions(+), 23 deletions(-) create mode 100644 .phpunit.result.cache diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index c8427567..d3b5a06a 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -14,28 +14,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - - - name: Setup node version and npm cache - uses: actions/setup-node@v3 - with: - node-version: 16 - cache: 'npm' - - - name: Install Node dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm install - - - name: Build plugin - run: npm run build - + - name: Generate ZIP file uses: 10up/action-wordpress-plugin-build-zip@stable diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 00000000..3167c19a --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +{"version":1,"defects":{"SimpleLocalAvatarsTest::test_assign_new_user_avatar":4,"SimpleLocalAvatarsTest::test_avatar_delete":4},"times":{"SimpleLocalAvatarsTest::test_add_hooks":0.072,"SimpleLocalAvatarsTest::test_is_network":0.002,"SimpleLocalAvatarsTest::test_get_network_mode":0.001,"SimpleLocalAvatarsTest::test_is_enforced":0,"SimpleLocalAvatarsTest::test_is_avatar_shared":0,"SimpleLocalAvatarsTest::test_get_avatar":0.001,"SimpleLocalAvatarsTest::test_plugin_filter_action_links":0.004,"SimpleLocalAvatarsTest::test_get_avatar_data":0.001,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_with_empty_id":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_user_with_no_avatar":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_media_file_deleted":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_override":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_no_override":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_default_avatar_without_alt":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_default_avatar_with_alt":0,"SimpleLocalAvatarsTest::test_admin_init":0.001,"SimpleLocalAvatarsTest::test_load_discussion_page":0,"SimpleLocalAvatarsTest::test_enqueue_scripts_wrong_screen":0,"SimpleLocalAvatarsTest::test_sanitize_options":0.001,"SimpleLocalAvatarsTest::test_get_default_avatar_url":0,"SimpleLocalAvatarsTest::test_avatar_settings_field":0,"SimpleLocalAvatarsTest::test_edit_user_profile":0.001,"SimpleLocalAvatarsTest::test_assign_new_user_avatar":0.001,"SimpleLocalAvatarsTest::test_edit_user_profile_update":0,"SimpleLocalAvatarsTest::test_action_remove_simple_local_avatar":0,"SimpleLocalAvatarsTest::test_unique_filename_callback":0,"SimpleLocalAvatarsTest::test_get_avatar_rest":0,"SimpleLocalAvatarsTest::test_user_edit_form_tag":0,"SimpleLocalAvatarsTest::test_upload_size_limit":0,"SimpleLocalAvatarsTest::test_avatar_delete":0,"SimpleLocalAvatarsTest::test_get_user_id":0.012}} \ No newline at end of file From ebc358ced1471240d7ac96b1fec306fbbecabef4 Mon Sep 17 00:00:00 2001 From: JK Date: Wed, 8 Mar 2023 22:05:07 +0600 Subject: [PATCH 17/31] Build dependency fix --- .github/workflows/cypress.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index a2398321..813a4548 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -8,6 +8,7 @@ jobs: build: uses: 10up/simple-local-avatars/.github/workflows/build-release-zip.yml@update/181 # TODO: Update this to develop branch before merge. cypress: + needs: build name: ${{ matrix.core.name }} runs-on: ubuntu-latest strategy: From 4e6ce7043788a0c81ba403b79a84543e1a82162d Mon Sep 17 00:00:00 2001 From: JK Date: Wed, 8 Mar 2023 22:20:28 +0600 Subject: [PATCH 18/31] Build dependency fix --- .github/workflows/cypress.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 813a4548..38a2128a 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -44,9 +44,6 @@ jobs: - name: Composer (optional) run: composer install continue-on-error: true - - name: Build (optional) - run: npm run build - continue-on-error: true - name: Set the core version and plugins config run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }} - name: Set up WP environment From 909af85de03573487992b3fb5d42e3b4ae97acfb Mon Sep 17 00:00:00 2001 From: JK Date: Mon, 20 Mar 2023 21:20:14 +0600 Subject: [PATCH 19/31] Build release file restore --- .github/workflows/build-release-zip.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index d3b5a06a..1f748911 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -15,5 +15,27 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + + - name: Setup node version and npm cache + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + + - name: Install Node dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm install + + - name: Build plugin + run: npm run build + - name: Generate ZIP file uses: 10up/action-wordpress-plugin-build-zip@stable From 1cf0d9a4f1187c7dd6c06405be0d84855462a687 Mon Sep 17 00:00:00 2001 From: Jayedul K Date: Mon, 20 Mar 2023 21:38:27 +0600 Subject: [PATCH 20/31] Delete .phpunit.result.cache --- .phpunit.result.cache | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .phpunit.result.cache diff --git a/.phpunit.result.cache b/.phpunit.result.cache deleted file mode 100644 index 3167c19a..00000000 --- a/.phpunit.result.cache +++ /dev/null @@ -1 +0,0 @@ -{"version":1,"defects":{"SimpleLocalAvatarsTest::test_assign_new_user_avatar":4,"SimpleLocalAvatarsTest::test_avatar_delete":4},"times":{"SimpleLocalAvatarsTest::test_add_hooks":0.072,"SimpleLocalAvatarsTest::test_is_network":0.002,"SimpleLocalAvatarsTest::test_get_network_mode":0.001,"SimpleLocalAvatarsTest::test_is_enforced":0,"SimpleLocalAvatarsTest::test_is_avatar_shared":0,"SimpleLocalAvatarsTest::test_get_avatar":0.001,"SimpleLocalAvatarsTest::test_plugin_filter_action_links":0.004,"SimpleLocalAvatarsTest::test_get_avatar_data":0.001,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_with_empty_id":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_user_with_no_avatar":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url_media_file_deleted":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_url":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_override":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_no_override":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_default_avatar_without_alt":0,"SimpleLocalAvatarsTest::test_get_simple_local_avatar_alt_with_default_avatar_with_alt":0,"SimpleLocalAvatarsTest::test_admin_init":0.001,"SimpleLocalAvatarsTest::test_load_discussion_page":0,"SimpleLocalAvatarsTest::test_enqueue_scripts_wrong_screen":0,"SimpleLocalAvatarsTest::test_sanitize_options":0.001,"SimpleLocalAvatarsTest::test_get_default_avatar_url":0,"SimpleLocalAvatarsTest::test_avatar_settings_field":0,"SimpleLocalAvatarsTest::test_edit_user_profile":0.001,"SimpleLocalAvatarsTest::test_assign_new_user_avatar":0.001,"SimpleLocalAvatarsTest::test_edit_user_profile_update":0,"SimpleLocalAvatarsTest::test_action_remove_simple_local_avatar":0,"SimpleLocalAvatarsTest::test_unique_filename_callback":0,"SimpleLocalAvatarsTest::test_get_avatar_rest":0,"SimpleLocalAvatarsTest::test_user_edit_form_tag":0,"SimpleLocalAvatarsTest::test_upload_size_limit":0,"SimpleLocalAvatarsTest::test_avatar_delete":0,"SimpleLocalAvatarsTest::test_get_user_id":0.012}} \ No newline at end of file From cfa08d05d6fe8a3bd9ee0dffef4aa32059fa6f68 Mon Sep 17 00:00:00 2001 From: Faisal Alvi Date: Tue, 21 Mar 2023 16:26:40 +0530 Subject: [PATCH 21/31] Update .github/workflows/build-release-zip.yml --- .github/workflows/build-release-zip.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index 1f748911..809f2b1a 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -14,7 +14,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Cache node_modules id: cache-node-modules uses: actions/cache@v3 From 6e5505c4c5686a7b3420047034ce313a62af1ecf Mon Sep 17 00:00:00 2001 From: Faisal Alvi Date: Tue, 21 Mar 2023 16:26:57 +0530 Subject: [PATCH 22/31] Update .github/workflows/cypress.yml --- .github/workflows/cypress.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 38a2128a..a76f61cc 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -6,7 +6,7 @@ on: - develop jobs: build: - uses: 10up/simple-local-avatars/.github/workflows/build-release-zip.yml@update/181 # TODO: Update this to develop branch before merge. + uses: 10up/simple-local-avatars/.github/workflows/build-release-zip.yml@develop cypress: needs: build name: ${{ matrix.core.name }} From 5e360bae87e0a4d63ed16a9bd12be8bbb11e3e4b Mon Sep 17 00:00:00 2001 From: JK Date: Thu, 23 Mar 2023 15:45:56 +0600 Subject: [PATCH 23/31] Avatar removal text update --- includes/class-simple-local-avatars.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-simple-local-avatars.php b/includes/class-simple-local-avatars.php index 4ab99924..b33cde71 100644 --- a/includes/class-simple-local-avatars.php +++ b/includes/class-simple-local-avatars.php @@ -926,7 +926,7 @@ public function edit_user_profile( $profileuser ) {   simple_local_avatar ) ? ' style="display:none;"' : ''; ?>> - +

Date: Sun, 26 Mar 2023 13:41:13 +0530 Subject: [PATCH 24/31] Feature #200 - Improve HTML structure and made loader stable --- includes/class-simple-local-avatars.php | 110 ++++++++++++------------ 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/includes/class-simple-local-avatars.php b/includes/class-simple-local-avatars.php index b33cde71..0eb8fa84 100644 --- a/includes/class-simple-local-avatars.php +++ b/includes/class-simple-local-avatars.php @@ -884,60 +884,64 @@ public function edit_user_profile( $profileuser ) { - - From 7d2a38af7e3728f360d2a9eab743269f66eadb04 Mon Sep 17 00:00:00 2001 From: JK Date: Thu, 6 Apr 2023 15:54:02 +0600 Subject: [PATCH 25/31] WP 6.2 compatibility update --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 86e5b4cd..cbe361af 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: jakemgold, 10up, thinkoomph, jeffpaul, faisal03 Donate link: https://10up.com/plugins/simple-local-avatars-wordpress/ Tags: avatar, gravatar, user photos, users, profile Requires at least: 5.7 -Tested up to: 6.1 +Tested up to: 6.2 Requires PHP: 7.4 Stable tag: 2.7.4 License: GPLv2 or later From d87186e7fdb991907eec7201b3b7205126683cd3 Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Wed, 10 May 2023 19:00:24 +0530 Subject: [PATCH 26/31] version bump to 2.7.5 --- package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 2 +- simple-local-avatars.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 40c79755..cb550c70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simple-local-avatars", - "version": "2.7.4", + "version": "2.7.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "simple-local-avatars", - "version": "2.7.4", + "version": "2.7.5", "license": "GNU General Public License v2.0", "devDependencies": { "@10up/cypress-wp-utils": "github:10up/cypress-wp-utils#build", diff --git a/package.json b/package.json index 2ec662d0..7db14ed9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-local-avatars", - "version": "2.7.4", + "version": "2.7.5", "description": "Adds an avatar upload field to user profiles. Generates requested sizes on demand just like Gravatar!", "scripts": { "build": "wp-scripts build", diff --git a/readme.txt b/readme.txt index cbe361af..db3d220c 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: avatar, gravatar, user photos, users, profile Requires at least: 5.7 Tested up to: 6.2 Requires PHP: 7.4 -Stable tag: 2.7.4 +Stable tag: 2.7.5 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/simple-local-avatars.php b/simple-local-avatars.php index 9d89be42..15021494 100644 --- a/simple-local-avatars.php +++ b/simple-local-avatars.php @@ -3,7 +3,7 @@ * Plugin Name: Simple Local Avatars * Plugin URI: https://10up.com/plugins/simple-local-avatars-wordpress/ * Description: Adds an avatar upload field to user profiles. Generates requested sizes on demand, just like Gravatar! Simple and lightweight. - * Version: 2.7.4 + * Version: 2.7.5 * Requires at least: 5.7 * Requires PHP: 7.4 * Author: 10up @@ -20,7 +20,7 @@ require_once dirname( __FILE__ ) . '/includes/class-simple-local-avatars.php'; // Global constants. -define( 'SLA_VERSION', '2.7.4' ); +define( 'SLA_VERSION', '2.7.5' ); define( 'SLA_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); if ( ! defined( 'SLA_IS_NETWORK' ) ) { From dee240f0d928c2949b8c11211cf42ff810d6d683 Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Thu, 11 May 2023 17:23:01 +0530 Subject: [PATCH 27/31] update the changelog file --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e74a3b4..13612435 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD +## [2.7.5] - 2023-05-12 + +### Added +- Ajax loading animation during process of uploading and deleting local avatars (props [@lllopo](https://github.com/lllopo), [@BhargavBhandari90](https://github.com/BhargavBhandari90), [@faisal-alvi](https://github.com/faisal-alvi) via [#204](https://github.com/10up/simple-local-avatars/pull/204)). + +### Changed +- Run E2E tests on the zip generated by "Build release zip" action (props [@jayedul](https://github.com/jayedul), [@iamdharmesh](https://github.com/iamdharmesh), [@faisal-alvi](https://github.com/faisal-alvi) via [#205](https://github.com/10up/simple-local-avatars/pull/205)). +- WP compatibility version upgraded to 6.2 (props [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi) via [#210](https://github.com/10up/simple-local-avatars/pull/210)). + +### Removed +- Avatar removal button text (props [@jayedul](https://github.com/jayedul), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#208](https://github.com/10up/simple-local-avatars/pull/208)). + +### Security +- Bump `webpack` from 5.75.0 to 5.76.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#207](https://github.com/10up/simple-local-avatars/pull/207)). + ## [2.7.4] - 2023-02-23 ### Fixed - Support passing `WP_User` to `get_avatar()` (props [@mattheu](https://github.com/mattheu), [@faisal-alvi](https://github.com/faisal-alvi) via [#193](https://github.com/10up/simple-local-avatars/pull/193)). From 83b3916115f983e5eb6bdbb7fa643ba3d1d4ecd6 Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Thu, 11 May 2023 17:25:31 +0530 Subject: [PATCH 28/31] updated the readme file --- CHANGELOG.md | 1 + readme.txt | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13612435..0fc70766 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -258,6 +258,7 @@ All notable changes to this project will be documented in this file, per [the Ke - Initial release [Unreleased]: https://github.com/10up/simple-local-avatars/compare/trunk...develop +[2.7.5]: https://github.com/10up/simple-local-avatars/compare/2.7.4...2.7.5 [2.7.4]: https://github.com/10up/simple-local-avatars/compare/2.7.3...2.7.4 [2.7.3]: https://github.com/10up/simple-local-avatars/compare/2.7.2...2.7.3 [2.7.2]: https://github.com/10up/simple-local-avatars/compare/2.7.1...2.7.2 diff --git a/readme.txt b/readme.txt index db3d220c..1b8b813c 100644 --- a/readme.txt +++ b/readme.txt @@ -41,6 +41,14 @@ You can also use `get_simple_local_avatar()` (with the same arguments) to retrei == Changelog == +## [2.7.5] - 2023-05-12 = + +* **Added:** Ajax loading animation during process of uploading and deleting local avatars (props [@lllopo](https://github.com/lllopo), [@BhargavBhandari90](https://github.com/BhargavBhandari90), [@faisal-alvi](https://github.com/faisal-alvi) via [#204](https://github.com/10up/simple-local-avatars/pull/204)). +* **Changed:** Run E2E tests on the zip generated by "Build release zip" action (props [@jayedul](https://github.com/jayedul), [@iamdharmesh](https://github.com/iamdharmesh), [@faisal-alvi](https://github.com/faisal-alvi) via [#205](https://github.com/10up/simple-local-avatars/pull/205)). +* **Changed:** WP compatibility version upgraded to 6.2 (props [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi) via [#210](https://github.com/10up/simple-local-avatars/pull/210)). +* **Removed:** Avatar removal button text (props [@jayedul](https://github.com/jayedul), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#208](https://github.com/10up/simple-local-avatars/pull/208)). +* **Security:** Bump `webpack` from 5.75.0 to 5.76.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#207](https://github.com/10up/simple-local-avatars/pull/207)). + = 2.7.4 - 2023-02-23 = * **Fixed:** Support passing `WP_User` to `get_avatar()` (props [@mattheu](https://github.com/mattheu), [@faisal-alvi](https://github.com/faisal-alvi) via [#193](https://github.com/10up/simple-local-avatars/pull/193)). * **Fixed:** Remove trailing commas in function calls (props [@patrixer](https://github.com/patrixer), [@dkotter](https://github.com/dkotter), [@sekra24](https://github.com/sekra24), [@faisal-alvi](https://github.com/faisal-alvi) via [#196](https://github.com/10up/simple-local-avatars/pull/196)). From 68db0c7bcce23045bea0788097cc81825002c218 Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Thu, 11 May 2023 17:27:02 +0530 Subject: [PATCH 29/31] added new contributor --- CREDITS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CREDITS.md b/CREDITS.md index 26be0d6c..ac791e8e 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc. -[Jake Goldman (@jakemgold)](https://github.com/jakemgold), [Steve Grunwell (@stevegrunwell)](https://github.com/stevegrunwell), [Ravi Chandra (@ravichdev)](https://github.com/ravichdev), [Eduard Florea (@eflorea)](https://github.com/eflorea), [Helen Hou-Sandi (@helen)](https://github.com/helen), [@kniebremser](https://github.com/kniebremser), [Robbie Trencheny (@robbiet480)](https://github.com/robbiet480), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Paul de Wouters (@pdewouters)](https://github.com/pdewouters), [Ledwing Hernandez (@Waka867)](https://github.com/Waka867), [Tim Moore (@tmoorewp)](https://github.com/tmoorewp), [Oscar Sanchez S. (@oscarssanchez)](https://github.com/oscarssanchez), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Ben Lobaugh (@blobaugh)](https://github.com/blobaugh), [Chris Jones (@heyjones)](https://github.com/heyjones), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Ammon Lockwood (@sumnercreations)](https://github.com/sumnercreations), [David Shanske (@dshanske)](https://github.com/dshanske), [Myles McNamara (@tripflex)](https://github.com/tripflex), [Jackie Kjome (@JackieKjome)](https://github.com/JackieKjome) [David Chabbi (@davidchabbi)](https://profiles.wordpress.org/davidchabbi/), [Jeffrey Carandang (@phpbits)](https://github.com/phpbits), [@Antonio-Laguna](https://github.com/Antonio-Laguna), [(@ituk)](https://github.com/ituk), [Fabio Giannese (@diodoe)](https://github.com/diodoe), [Ankit K Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [Ajay Maurya (@ajmaurya99)](https://github.com/ajmaurya99), [Clayton Collie (@claytoncollie)](https://github.com/claytoncollie), [Connor Smyth (@ActuallyConnor)](https://github.com/ActuallyConnor), [Thrijith Thankachan (@thrijith)](https://github.com/thrijith), [Rahul Prajapati (@rahulsprajapati)](https://github.com/rahulsprajapati), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Sudip Dadhaniya (@sudip-10up)](https://github.com/sudip-10up), [Max Lyuchin (@cadic)](https://github.com/cadic), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [(@holle75)](https://github.com/holle75), [Mehul Kaklotar (@mehulkaklotar)](https://github.com/mehulkaklotar), [Ulrich Pogson (@grappler)](https://github.com/grappler), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Austin Passy (@thefrosty)](https://github.com/thefrosty), [Vikram Moparthy (@vikrampm1)](https://github.com/vikrampm1), [Alireza Salehi (@alireza-salehi)](https://github.com/alireza-salehi), [Vlad Olaru (@vladolaru)](https://github.com/vladolaru), [Alec Kinnear (@foliovision)](https://github.com/foliovision), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [David (@pixelloop)](https://github.com/pixelloop), [Victor Berland (@victorberland)](https://github.com/victorberland), [Konstantin Kovshenin (@kovshenin)](https://github.com/kovshenin), [Timothy Wheelock (@t-lock)](https://github.com/t-lock), [Jayedul Kabir (@jayedul)](https://github.com/jayedul), [Quamruz Zaman (@zamanq)](https://github.com/zamanq), [K. Adam White (@kadamwhite)](https://github.com/kadamwhite), [Shirkit (@Shirkit)](https://github.com/Shirkit), [Georgi Georgiev (@lllopo)](https://github.com/lllopo), [Matt Watson (@mattwatsoncodes)](https://github.com/mattwatsoncodes), [Christoph Rothmeier (@Rottinator)](https://github.com/Rottinator), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk), [Matthew Haines-Young (@mattheu)](https://github.com/mattheu), [Patryk Kujawa (@patrixer)](https://github.com/patrixer), [Sebastian (@sekra24)](https://github.com/sekra24). +[Jake Goldman (@jakemgold)](https://github.com/jakemgold), [Steve Grunwell (@stevegrunwell)](https://github.com/stevegrunwell), [Ravi Chandra (@ravichdev)](https://github.com/ravichdev), [Eduard Florea (@eflorea)](https://github.com/eflorea), [Helen Hou-Sandi (@helen)](https://github.com/helen), [@kniebremser](https://github.com/kniebremser), [Robbie Trencheny (@robbiet480)](https://github.com/robbiet480), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Paul de Wouters (@pdewouters)](https://github.com/pdewouters), [Ledwing Hernandez (@Waka867)](https://github.com/Waka867), [Tim Moore (@tmoorewp)](https://github.com/tmoorewp), [Oscar Sanchez S. (@oscarssanchez)](https://github.com/oscarssanchez), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Ben Lobaugh (@blobaugh)](https://github.com/blobaugh), [Chris Jones (@heyjones)](https://github.com/heyjones), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Ammon Lockwood (@sumnercreations)](https://github.com/sumnercreations), [David Shanske (@dshanske)](https://github.com/dshanske), [Myles McNamara (@tripflex)](https://github.com/tripflex), [Jackie Kjome (@JackieKjome)](https://github.com/JackieKjome) [David Chabbi (@davidchabbi)](https://profiles.wordpress.org/davidchabbi/), [Jeffrey Carandang (@phpbits)](https://github.com/phpbits), [@Antonio-Laguna](https://github.com/Antonio-Laguna), [(@ituk)](https://github.com/ituk), [Fabio Giannese (@diodoe)](https://github.com/diodoe), [Ankit K Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [Ajay Maurya (@ajmaurya99)](https://github.com/ajmaurya99), [Clayton Collie (@claytoncollie)](https://github.com/claytoncollie), [Connor Smyth (@ActuallyConnor)](https://github.com/ActuallyConnor), [Thrijith Thankachan (@thrijith)](https://github.com/thrijith), [Rahul Prajapati (@rahulsprajapati)](https://github.com/rahulsprajapati), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Sudip Dadhaniya (@sudip-10up)](https://github.com/sudip-10up), [Max Lyuchin (@cadic)](https://github.com/cadic), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [(@holle75)](https://github.com/holle75), [Mehul Kaklotar (@mehulkaklotar)](https://github.com/mehulkaklotar), [Ulrich Pogson (@grappler)](https://github.com/grappler), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Austin Passy (@thefrosty)](https://github.com/thefrosty), [Vikram Moparthy (@vikrampm1)](https://github.com/vikrampm1), [Alireza Salehi (@alireza-salehi)](https://github.com/alireza-salehi), [Vlad Olaru (@vladolaru)](https://github.com/vladolaru), [Alec Kinnear (@foliovision)](https://github.com/foliovision), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [David (@pixelloop)](https://github.com/pixelloop), [Victor Berland (@victorberland)](https://github.com/victorberland), [Konstantin Kovshenin (@kovshenin)](https://github.com/kovshenin), [Timothy Wheelock (@t-lock)](https://github.com/t-lock), [Jayedul Kabir (@jayedul)](https://github.com/jayedul), [Quamruz Zaman (@zamanq)](https://github.com/zamanq), [K. Adam White (@kadamwhite)](https://github.com/kadamwhite), [Shirkit (@Shirkit)](https://github.com/Shirkit), [Georgi Georgiev (@lllopo)](https://github.com/lllopo), [Matt Watson (@mattwatsoncodes)](https://github.com/mattwatsoncodes), [Christoph Rothmeier (@Rottinator)](https://github.com/Rottinator), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk), [Matthew Haines-Young (@mattheu)](https://github.com/mattheu), [Patryk Kujawa (@patrixer)](https://github.com/patrixer), [Sebastian (@sekra24)](https://github.com/sekra24), [Bhargav Bhandari (@BhargavBhandari90)](https://github.com/BhargavBhandari90). ## Libraries From a98beb58f0cfaf0989473c24e0455035a97a88d4 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Thu, 11 May 2023 15:51:26 -0500 Subject: [PATCH 30/31] Update CHANGELOG.md --- CHANGELOG.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fc70766..12561ae1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,13 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD ## [2.7.5] - 2023-05-12 - ### Added - Ajax loading animation during process of uploading and deleting local avatars (props [@lllopo](https://github.com/lllopo), [@BhargavBhandari90](https://github.com/BhargavBhandari90), [@faisal-alvi](https://github.com/faisal-alvi) via [#204](https://github.com/10up/simple-local-avatars/pull/204)). ### Changed -- Run E2E tests on the zip generated by "Build release zip" action (props [@jayedul](https://github.com/jayedul), [@iamdharmesh](https://github.com/iamdharmesh), [@faisal-alvi](https://github.com/faisal-alvi) via [#205](https://github.com/10up/simple-local-avatars/pull/205)). -- WP compatibility version upgraded to 6.2 (props [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi) via [#210](https://github.com/10up/simple-local-avatars/pull/210)). - -### Removed - Avatar removal button text (props [@jayedul](https://github.com/jayedul), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#208](https://github.com/10up/simple-local-avatars/pull/208)). +- WordPress "tested up to" version 6.2 (props [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi) via [#210](https://github.com/10up/simple-local-avatars/pull/210)). +- Run E2E tests on the zip generated by "Build release zip" action (props [@jayedul](https://github.com/jayedul), [@iamdharmesh](https://github.com/iamdharmesh), [@faisal-alvi](https://github.com/faisal-alvi) via [#205](https://github.com/10up/simple-local-avatars/pull/205)). ### Security - Bump `webpack` from 5.75.0 to 5.76.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#207](https://github.com/10up/simple-local-avatars/pull/207)). From b8ef794102d10cc47a387550b404d807f792534c Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Thu, 11 May 2023 15:52:49 -0500 Subject: [PATCH 31/31] Update readme.txt --- readme.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index 1b8b813c..f051650f 100644 --- a/readme.txt +++ b/readme.txt @@ -42,11 +42,10 @@ You can also use `get_simple_local_avatar()` (with the same arguments) to retrei == Changelog == ## [2.7.5] - 2023-05-12 = - * **Added:** Ajax loading animation during process of uploading and deleting local avatars (props [@lllopo](https://github.com/lllopo), [@BhargavBhandari90](https://github.com/BhargavBhandari90), [@faisal-alvi](https://github.com/faisal-alvi) via [#204](https://github.com/10up/simple-local-avatars/pull/204)). +* **Changed:** Avatar removal button text (props [@jayedul](https://github.com/jayedul), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#208](https://github.com/10up/simple-local-avatars/pull/208)). +* **Changed:** WordPress "tested up to" version 6.2 (props [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi) via [#210](https://github.com/10up/simple-local-avatars/pull/210)). * **Changed:** Run E2E tests on the zip generated by "Build release zip" action (props [@jayedul](https://github.com/jayedul), [@iamdharmesh](https://github.com/iamdharmesh), [@faisal-alvi](https://github.com/faisal-alvi) via [#205](https://github.com/10up/simple-local-avatars/pull/205)). -* **Changed:** WP compatibility version upgraded to 6.2 (props [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi) via [#210](https://github.com/10up/simple-local-avatars/pull/210)). -* **Removed:** Avatar removal button text (props [@jayedul](https://github.com/jayedul), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#208](https://github.com/10up/simple-local-avatars/pull/208)). * **Security:** Bump `webpack` from 5.75.0 to 5.76.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#207](https://github.com/10up/simple-local-avatars/pull/207)). = 2.7.4 - 2023-02-23 =
- ID ) ); - remove_filter( 'pre_option_avatar_rating', '__return_empty_string' ); - ?> - - - options['caps'] ); - } - - if ( $upload_rights ) { - do_action( 'simple_local_avatar_notices' ); - wp_nonce_field( 'simple_local_avatar_nonce', '_simple_local_avatar_nonce', false ); - $remove_url = add_query_arg( - array( - 'action' => 'remove-simple-local-avatar', - 'user_id' => $profileuser->ID, - '_wpnonce' => $this->remove_nonce, - ) - ); - ?> - +
+
+ ID ) ); + remove_filter( 'pre_option_avatar_rating', '__return_empty_string' ); ?> -

-
- -

- -

- -   - - simple_local_avatar ) ? ' style="display:none;"' : ''; ?>> - - -

- simple_local_avatar ) ) { - echo '' . esc_html__( 'No local avatar is set. Set up your avatar at Gravatar.com.', 'simple-local-avatars' ) . ''; - } else { - echo '' . esc_html__( 'You do not have media management permissions. To change your local avatar, contact the blog administrator.', 'simple-local-avatars' ) . ''; - } - } - ?> + +
+
+ options['caps'] ); + } + + if ( $upload_rights ) { + do_action( 'simple_local_avatar_notices' ); + wp_nonce_field( 'simple_local_avatar_nonce', '_simple_local_avatar_nonce', false ); + $remove_url = add_query_arg( + array( + 'action' => 'remove-simple-local-avatar', + 'user_id' => $profileuser->ID, + '_wpnonce' => $this->remove_nonce, + ) + ); + ?> + +

+
+ +

+ +

+ +   + + simple_local_avatar ) ? ' style="display:none;"' : ''; ?>> + + +

+ simple_local_avatar ) ) { + echo '' . esc_html__( 'No local avatar is set. Set up your avatar at Gravatar.com.', 'simple-local-avatars' ) . ''; + } else { + echo '' . esc_html__( 'You do not have media management permissions. To change your local avatar, contact the blog administrator.', 'simple-local-avatars' ) . ''; + } + } + ?> +
+