From 08ad6b1260d422a46d613824316d6e2c53deb531 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Jan 2023 04:21:55 +0000 Subject: [PATCH 01/15] build(deps): bump simple-git from 3.15.1 to 3.16.0 Bumps [simple-git](https://github.com/steveukx/git-js/tree/HEAD/simple-git) from 3.15.1 to 3.16.0. - [Release notes](https://github.com/steveukx/git-js/releases) - [Changelog](https://github.com/steveukx/git-js/blob/main/simple-git/CHANGELOG.md) - [Commits](https://github.com/steveukx/git-js/commits/simple-git@3.16.0/simple-git) --- updated-dependencies: - dependency-name: simple-git 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 c7f7108a..8222ffd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16472,9 +16472,9 @@ "dev": true }, "node_modules/simple-git": { - "version": "3.15.1", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.15.1.tgz", - "integrity": "sha512-73MVa5984t/JP4JcQt0oZlKGr42ROYWC3BcUZfuHtT3IHKPspIvL0cZBnvPXF7LL3S/qVeVHVdYYmJ3LOTw4Rg==", + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.16.0.tgz", + "integrity": "sha512-zuWYsOLEhbJRWVxpjdiXl6eyAyGo/KzVW+KFhhw9MqEEJttcq+32jTWSGyxTdf9e/YCohxRE+9xpWFj9FdiJNw==", "dev": true, "dependencies": { "@kwsites/file-exists": "^1.1.1", @@ -31420,9 +31420,9 @@ "dev": true }, "simple-git": { - "version": "3.15.1", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.15.1.tgz", - "integrity": "sha512-73MVa5984t/JP4JcQt0oZlKGr42ROYWC3BcUZfuHtT3IHKPspIvL0cZBnvPXF7LL3S/qVeVHVdYYmJ3LOTw4Rg==", + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.16.0.tgz", + "integrity": "sha512-zuWYsOLEhbJRWVxpjdiXl6eyAyGo/KzVW+KFhhw9MqEEJttcq+32jTWSGyxTdf9e/YCohxRE+9xpWFj9FdiJNw==", "dev": true, "requires": { "@kwsites/file-exists": "^1.1.1", From f1a0ce9e9a1130368ccf5f58a5534456cf85eae8 Mon Sep 17 00:00:00 2001 From: Matthew Haines-Young Date: Mon, 30 Jan 2023 16:22:35 +0000 Subject: [PATCH 02/15] Support passing user objects to get_user_id --- includes/class-simple-local-avatars.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/class-simple-local-avatars.php b/includes/class-simple-local-avatars.php index eeadfb58..b5c6c25e 100644 --- a/includes/class-simple-local-avatars.php +++ b/includes/class-simple-local-avatars.php @@ -307,6 +307,8 @@ public function get_user_id( $id_or_email ) { $user_id = (int) $id_or_email; } elseif ( is_object( $id_or_email ) && ! empty( $id_or_email->user_id ) ) { $user_id = (int) $id_or_email->user_id; + } elseif ( $id_or_email instanceof WP_User ) { + $user_id = $id_or_email->ID; } elseif ( $id_or_email instanceof WP_Post && ! empty( $id_or_email->post_author ) ) { $user_id = (int) $id_or_email->post_author; } elseif ( is_string( $id_or_email ) ) { From ae8730863a14a5399dc7246ee20b3f700f0ab99e Mon Sep 17 00:00:00 2001 From: Matthew Haines-Young Date: Mon, 30 Jan 2023 16:50:01 +0000 Subject: [PATCH 03/15] Add tests --- tests/phpunit/SimpleLocalAvatarsTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/phpunit/SimpleLocalAvatarsTest.php b/tests/phpunit/SimpleLocalAvatarsTest.php index 2050b1f0..c6b81b6e 100644 --- a/tests/phpunit/SimpleLocalAvatarsTest.php +++ b/tests/phpunit/SimpleLocalAvatarsTest.php @@ -489,4 +489,18 @@ public function test_avatar_delete() { $this->instance->avatar_delete( 1 ); } + + public function test_get_user_id() { + $this->assertEquals( 0, $this->instance->get_user_id( '0' ) ); + $this->assertEquals( 0, $this->instance->get_user_id( 'test@example.com' ) ); + + $user = new WP_User( [ 'ID' => 1 ] ); + $this->assertEquals( 1, $this->instance->get_user_id( $user ) ); + + $post = new WP_Post( [ 'post_author' => '1' ] ); + $this->assertEquals( 1, $this->instance->get_user_id( $post ) ); + + $comment = new WP_Comment( [ 'user_id' => '1' ] ); + $this->assertEquals( 1, $this->instance->get_user_id( $comment ) ); + } } From 1add929de8e3a7ed40bf7e593dcdbe967c4a685c Mon Sep 17 00:00:00 2001 From: Matthew Haines-Young Date: Mon, 30 Jan 2023 18:12:29 +0000 Subject: [PATCH 04/15] Mock WP objects --- tests/phpunit/SimpleLocalAvatarsTest.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/phpunit/SimpleLocalAvatarsTest.php b/tests/phpunit/SimpleLocalAvatarsTest.php index c6b81b6e..77d40501 100644 --- a/tests/phpunit/SimpleLocalAvatarsTest.php +++ b/tests/phpunit/SimpleLocalAvatarsTest.php @@ -28,10 +28,9 @@ public function setUp(): void { 'X' => __( 'X — Even more mature than above', 'simple-local-avatars' ), ) ); - $user = (object) [ - 'ID' => 1, - 'display_name' => 'TEST_USER', - ]; + $user = Mockery::mock( WP_User::class ); + $user->ID = 1; + $user->display_name = 'TEST_USER'; // Init $POST. $_POST = array(); @@ -491,16 +490,19 @@ public function test_avatar_delete() { } public function test_get_user_id() { - $this->assertEquals( 0, $this->instance->get_user_id( '0' ) ); - $this->assertEquals( 0, $this->instance->get_user_id( 'test@example.com' ) ); + $this->assertEquals( 1, $this->instance->get_user_id( '1' ) ); + $this->assertEquals( 1, $this->instance->get_user_id( 'test@example.com' ) ); - $user = new WP_User( [ 'ID' => 1 ] ); + $user = Mockery::mock( WP_User::class ); + $user->ID = 1; $this->assertEquals( 1, $this->instance->get_user_id( $user ) ); - $post = new WP_Post( [ 'post_author' => '1' ] ); + $post = Mockery::mock( WP_Post::class ); + $post->post_author = 1; $this->assertEquals( 1, $this->instance->get_user_id( $post ) ); - $comment = new WP_Comment( [ 'user_id' => '1' ] ); + $comment = Mockery::mock( WP_Comment::class ); + $comment->user_id = '1'; $this->assertEquals( 1, $this->instance->get_user_id( $comment ) ); } } From 47eea4f6f458de3bbd4abebda444484406b39c7f Mon Sep 17 00:00:00 2001 From: Sebastian Kraus Date: Tue, 31 Jan 2023 23:56:26 +0100 Subject: [PATCH 05/15] Removed trailing commas --- includes/class-simple-local-avatars.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/class-simple-local-avatars.php b/includes/class-simple-local-avatars.php index eeadfb58..31bb9e5f 100644 --- a/includes/class-simple-local-avatars.php +++ b/includes/class-simple-local-avatars.php @@ -524,13 +524,13 @@ public function define_avatar_ratings() { */ $this->avatar_ratings = array( /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */ - 'G' => __( 'G — Suitable for all audiences', ), + 'G' => __( 'G — Suitable for all audiences' ), /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */ - 'PG' => __( 'PG — Possibly offensive, usually for audiences 13 and above', ), + 'PG' => __( 'PG — Possibly offensive, usually for audiences 13 and above' ), /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */ - 'R' => __( 'R — Intended for adult audiences above 17', ), + 'R' => __( 'R — Intended for adult audiences above 17' ), /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */ - 'X' => __( 'X — Even more mature than above', ), + 'X' => __( 'X — Even more mature than above' ), ); } From 60063d57740b1fc841802b606f3af596fd3641dc Mon Sep 17 00:00:00 2001 From: Matthew Haines-Young Date: Thu, 2 Feb 2023 14:00:28 +0000 Subject: [PATCH 06/15] Fix whitespace per feedback Co-authored-by: Faisal Alvi --- tests/phpunit/SimpleLocalAvatarsTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/SimpleLocalAvatarsTest.php b/tests/phpunit/SimpleLocalAvatarsTest.php index 77d40501..7b7c3ce3 100644 --- a/tests/phpunit/SimpleLocalAvatarsTest.php +++ b/tests/phpunit/SimpleLocalAvatarsTest.php @@ -28,8 +28,8 @@ public function setUp(): void { 'X' => __( 'X — Even more mature than above', 'simple-local-avatars' ), ) ); - $user = Mockery::mock( WP_User::class ); - $user->ID = 1; + $user = Mockery::mock( WP_User::class ); + $user->ID = 1; $user->display_name = 'TEST_USER'; // Init $POST. @@ -493,15 +493,15 @@ public function test_get_user_id() { $this->assertEquals( 1, $this->instance->get_user_id( '1' ) ); $this->assertEquals( 1, $this->instance->get_user_id( 'test@example.com' ) ); - $user = Mockery::mock( WP_User::class ); + $user = Mockery::mock( WP_User::class ); $user->ID = 1; $this->assertEquals( 1, $this->instance->get_user_id( $user ) ); - $post = Mockery::mock( WP_Post::class ); + $post = Mockery::mock( WP_Post::class ); $post->post_author = 1; $this->assertEquals( 1, $this->instance->get_user_id( $post ) ); - $comment = Mockery::mock( WP_Comment::class ); + $comment = Mockery::mock( WP_Comment::class ); $comment->user_id = '1'; $this->assertEquals( 1, $this->instance->get_user_id( $comment ) ); } From df53502d9b35d1bce29733a512463b76828c4f6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 4 Feb 2023 12:23:42 +0000 Subject: [PATCH 07/15] build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics 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 8222ffd6..cba69287 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9877,9 +9877,9 @@ } }, "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true }, "node_modules/http-deceiver": { @@ -26477,9 +26477,9 @@ } }, "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true }, "http-deceiver": { From 797f9cd5d9f3959df71823efdd4912406df85236 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Thu, 9 Feb 2023 13:39:54 -0700 Subject: [PATCH 08/15] Update release instructions so they match what we do elsewhere --- CONTRIBUTING.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b95b9e0..60c2d3ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,19 +29,18 @@ The `develop` branch is the development branch which means it contains the next ## Release instructions - [ ] Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes. -- [ ] Version bump: Bump the version number in `package.json`, `readme.txt`, and `simple-local-avatars.php` if it does not already reflect the version being released. Update both the plugin "Version:" property and the plugin `SLA_VERSION` constant in `simple-local-avatars.php`. -- [ ] Changelog: Add/update the changelog in both `CHANGELOG.md` and `readme.txt`. (Recommendation to use: https://github.com/10up/changelog-generator) -- [ ] Props: update `CREDITS.md` with any new contributors, and confirm maintainers are accurate. (Recommendation to use: https://github.com/10up/credits-generator) +- [ ] Version bump: Bump the version number in `package.json`, `package-lock.json`, `readme.txt`, and `simple-local-avatars.php` if it does not already reflect the version being released. Update both the plugin "Version:" property and the plugin `SLA_VERSION` constant in `simple-local-avatars.php`. +- [ ] Changelog: Add/update the changelog in both `CHANGELOG.md` and `readme.txt`. +- [ ] Props: update `CREDITS.md` with any new contributors, and confirm maintainers are accurate. - [ ] New files: Check to be sure any new files/paths that are unnecessary in the production version are included in [.distignore](https://github.com/10up/simple-local-avatars/blob/develop/.distignore). - [ ] Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different. - [ ] Make sure the release date is added in the `CHANGELOG.md`. -- [ ] Before proceeding to the next step, ensure you pull the latest changes from the `develop` branch locally. This will bring in the changes from the merged release PR. -- [ ] Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then do the same for `develop` into `trunk` (`git checkout trunk && git merge --no-ff develop`). `trunk` contains the latest stable release. -- [ ] Test: Run through common tasks while on `trunk` to be sure it functions correctly. +- [ ] Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then do the same for `develop` into `trunk`, ensuring you pull the most recent changes into `develop` first (`git checkout develop && git pull origin develop && git checkout trunk && git merge --no-ff develop`). `trunk` contains the latest stable release. - [ ] Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`). -- [ ] Test the pre-release ZIP locally by [downloading](https://github.com/10up/simple-local-avatars/actions/workflows/build-release-zip.yml) it from the **Build release zip** action artifact to ensure the plugin doesn't break after release. +- [ ] [Compare](https://github.com/10up/simple-local-avatars/compare/trunk...develop) `trunk` to `develop` to ensure no additional changes were missed. +- [ ] Test the pre-release ZIP locally by [downloading](https://github.com/10up/simple-local-avatars/actions/workflows/build-release-zip.yml) it from the Build release zip action artifact and installing it locally. Ensure this zip has all the files we expect, that it installs and activates correctly and that all basic functionality is working. - [ ] Release: Create a [new release](https://github.com/10up/simple-local-avatars/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the [closed issues on the milestone](https://github.com/10up/simple-local-avatars/milestone/#?closed=1). - [ ] SVN: Wait for the [GitHub Action](https://github.com/10up/simple-local-avatars/actions/workflows/push-deploy.yml) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes. -- [ ] Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/simple-local-avatars/. This may take a few minutes. +- [ ] Check WordPress.org: Ensure that the changes are live on [WordPress.org](https://wordpress.org/plugins/simple-local-avatars/). This may take a few minutes. - [ ] Close the milestone: Edit the [milestone](https://github.com/10up/simple-local-avatars/milestone/#) with the release date (in the `Due date (optional)` field) and link to the GitHub release (in the `Description` field), then close the milestone. - [ ] Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`. From 6ccff155de627df8c2a2bd472d6e6b133255e60c Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Thu, 16 Feb 2023 14:06:46 +0530 Subject: [PATCH 09/15] updating the release steps as per 10up/.github --- CONTRIBUTING.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60c2d3ac..fe973960 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,18 +29,18 @@ The `develop` branch is the development branch which means it contains the next ## Release instructions - [ ] Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes. -- [ ] Version bump: Bump the version number in `package.json`, `package-lock.json`, `readme.txt`, and `simple-local-avatars.php` if it does not already reflect the version being released. Update both the plugin "Version:" property and the plugin `SLA_VERSION` constant in `simple-local-avatars.php`. -- [ ] Changelog: Add/update the changelog in both `CHANGELOG.md` and `readme.txt`. -- [ ] Props: update `CREDITS.md` with any new contributors, and confirm maintainers are accurate. +- [ ] Version bump: Bump the version number in `package.json`, `package-lock.json`, `readme.txt`, and `simple-local-avatars.php` if it does not already reflect the version being released. Update both the plugin "Version:" property and the plugin `SLA_VERSION` constant in `simple-local-avatars.php`. +- [ ] Changelog: Add/update the changelog in both `CHANGELOG.md` and `readme.txt`. (Recommendation to use: https://github.com/10up/changelog-generator) +- [ ] Props: update `CREDITS.md` with any new contributors, and confirm maintainers are accurate. (Recommendation to use: https://github.com/10up/credits-generator) - [ ] New files: Check to be sure any new files/paths that are unnecessary in the production version are included in [.distignore](https://github.com/10up/simple-local-avatars/blob/develop/.distignore). - [ ] Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different. - [ ] Make sure the release date is added in the `CHANGELOG.md`. - [ ] Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then do the same for `develop` into `trunk`, ensuring you pull the most recent changes into `develop` first (`git checkout develop && git pull origin develop && git checkout trunk && git merge --no-ff develop`). `trunk` contains the latest stable release. - [ ] Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`). -- [ ] [Compare](https://github.com/10up/simple-local-avatars/compare/trunk...develop) `trunk` to `develop` to ensure no additional changes were missed. -- [ ] Test the pre-release ZIP locally by [downloading](https://github.com/10up/simple-local-avatars/actions/workflows/build-release-zip.yml) it from the Build release zip action artifact and installing it locally. Ensure this zip has all the files we expect, that it installs and activates correctly and that all basic functionality is working. +- [ ] [Compare](https://github.com/10up/simple-local-avatars/compare/trunk...develop) `trunk` to `develop` to ensure no additional changes were missed. Visit https://github.com/10up/simple-local-avatars/compare/trunk...develop +- [ ] Test the pre-release ZIP locally by [downloading](https://github.com/10up/simple-local-avatars/actions/workflows/build-release-zip.yml) it from the **Build release zip** action artifact to ensure the plugin doesn't break after release. - [ ] Release: Create a [new release](https://github.com/10up/simple-local-avatars/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the [closed issues on the milestone](https://github.com/10up/simple-local-avatars/milestone/#?closed=1). - [ ] SVN: Wait for the [GitHub Action](https://github.com/10up/simple-local-avatars/actions/workflows/push-deploy.yml) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes. -- [ ] Check WordPress.org: Ensure that the changes are live on [WordPress.org](https://wordpress.org/plugins/simple-local-avatars/). This may take a few minutes. +- [ ] Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/simple-local-avatars/. This may take a few minutes. - [ ] Close the milestone: Edit the [milestone](https://github.com/10up/simple-local-avatars/milestone/#) with the release date (in the `Due date (optional)` field) and link to the GitHub release (in the `Description` field), then close the milestone. - [ ] Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`. From 4fa87de17167301001d2922399f85764b002929f Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Thu, 16 Feb 2023 14:30:35 +0530 Subject: [PATCH 10/15] version bump to `2.7.4` --- CHANGELOG.md | 1 + package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 2 +- simple-local-avatars.php | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09c8d403..fc49901a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -234,6 +234,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.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 [2.7.1]: https://github.com/10up/simple-local-avatars/compare/2.7.0...2.7.1 diff --git a/package-lock.json b/package-lock.json index cba69287..b168632a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simple-local-avatars", - "version": "2.7.3", + "version": "2.7.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "simple-local-avatars", - "version": "2.7.3", + "version": "2.7.4", "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 8a23cd50..2ec662d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-local-avatars", - "version": "2.7.3", + "version": "2.7.4", "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 499e7533..5cb8ad29 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.1 Requires PHP: 7.4 -Stable tag: 2.7.3 +Stable tag: 2.7.4 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 c22f99b7..9d89be42 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.3 + * Version: 2.7.4 * 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.3' ); +define( 'SLA_VERSION', '2.7.4' ); define( 'SLA_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); if ( ! defined( 'SLA_IS_NETWORK' ) ) { From 47e9d1a43789213ea25496bbd45b431dda86bf5b Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Thu, 16 Feb 2023 14:53:58 +0530 Subject: [PATCH 11/15] updating `CHANGELOG.md` --- CHANGELOG.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc49901a..4b628be2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD +## [2.7.4] - 2023-02-17 + +### 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)). + +### 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)) +- Bump `http-cache-semantics` from 4.1.0 to 4.1.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#191](https://github.com/10up/simple-local-avatars/pull/191)) + ## [2.7.3] - 2023-01-16 ### Fixed - Issue causing fatal errors when avatars used on front end of site (props [@Rottinator](https://github.com/Rottinator), [@peterwilsoncc](https://github.com/peterwilsoncc), [@ravinderk](https://github.com/ravinderk), [@faisal-alvi](https://github.com/faisal-alvi) via [#187](https://github.com/10up/simple-local-avatars/pull/187)). @@ -25,7 +35,7 @@ All notable changes to this project will be documented in this file, per [the Ke - textdomain from the core strings and the function `update_avatar_ratings` as it's not required anymore (props [@dkotter](https://github.com/dkotter), [@lllopo](https://github.com/lllopo), [@faisal-alvi](https://github.com/faisal-alvi), [@jeffpaul](https://github.com/jeffpaul) via [#175](https://github.com/10up/simple-local-avatars/pull/175)). ### Security -- Bump `json5` from 1.0.1 to 1.0.2 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#182](https://github.com/10up/simple-local-avatars/pull/182)). +- Bump `json5` from 1.0.1 to 1.0.2 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#182](https://github.com/10up/simple-local-avatars/pull/182)). ## [2.7.1] - 2022-12-08 ### Added @@ -54,7 +64,7 @@ All notable changes to this project will be documented in this file, per [the Ke **Note that this release bumps the minimum required version of WordPress from 4.6 to 5.7 and PHP from 5.6 to 7.4.** ### Added -- If a default avatar image is used, ensure that outputs alt text. This will either be default text (Avatar photo) or the alt text from the uploaded default image (props [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#147](https://github.com/10up/simple-local-avatars/pull/147)). +- If a default avatar image is used, ensure that outputs alt text. This will either be default text (Avatar photo) or the alt text from the uploaded default image (props [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#147](https://github.com/10up/simple-local-avatars/pull/147)). - Two hooks, `simple_local_avatar_updated` and `simple_local_avatar_deleted`, to allow theme or plugin developers to react to changes in local avatars in a consistent and precise way (props [@t-lock](https://github.com/t-lock), [@faisal-alvi](https://github.com/faisal-alvi), [@dkotter](https://github.com/dkotter) via [#149](https://github.com/10up/simple-local-avatars/pull/149)). ### Changed From bdca5b595cca01b2f8c949f8c6a9e1112804b9ba Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Thu, 16 Feb 2023 14:54:15 +0530 Subject: [PATCH 12/15] updating `CREDITS.md` --- CREDITS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CREDITS.md b/CREDITS.md index f5c188f2..26be0d6c 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). +[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). ## Libraries From efd7df30712d58796a41099d7dc9f0417541f552 Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Thu, 16 Feb 2023 14:54:26 +0530 Subject: [PATCH 13/15] updating `readme.txt` --- readme.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/readme.txt b/readme.txt index 5cb8ad29..44e801ea 100644 --- a/readme.txt +++ b/readme.txt @@ -41,6 +41,12 @@ You can also use `get_simple_local_avatar()` (with the same arguments) to retrei == Changelog == += 2.7.4 - 2023-02-17 = +* **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)) +* **Security:** Bump `http-cache-semantics` from 4.1.0 to 4.1.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#191](https://github.com/10up/simple-local-avatars/pull/191)) + = 2.7.3 - 2023-01-16 = * **Fixed:** Issue causing fatal errors when avatars used on front end of site (props [@Rottinator](https://github.com/Rottinator), [@peterwilsoncc](https://github.com/peterwilsoncc), [@ravinderk](https://github.com/ravinderk), [@faisal-alvi](https://github.com/faisal-alvi) via [#187](https://github.com/10up/simple-local-avatars/pull/187)). * **Fixed:** Deprecation error in admin on PHP 8.0 and later (props [@Rottinator](https://github.com/Rottinator), [@peterwilsoncc](https://github.com/peterwilsoncc), [@ravinderk](https://github.com/ravinderk), [@faisal-alvi](https://github.com/faisal-alvi) via [#187](https://github.com/10up/simple-local-avatars/pull/187)). From b353e40d79dfbe6327bdcbb3c8521eef2e8db328 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Fri, 17 Feb 2023 16:46:33 -0600 Subject: [PATCH 14/15] Update CHANGELOG.md --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b628be2..51a71f6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,13 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD ## [2.7.4] - 2023-02-17 - ### 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)). ### 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)) -- Bump `http-cache-semantics` from 4.1.0 to 4.1.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#191](https://github.com/10up/simple-local-avatars/pull/191)) +- 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)). +- Bump `http-cache-semantics` from 4.1.0 to 4.1.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#197](https://github.com/10up/simple-local-avatars/pull/197)). ## [2.7.3] - 2023-01-16 ### Fixed From 61dd00b3235f832c0000bfa97e6bce308d6c4435 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Fri, 17 Feb 2023 16:46:59 -0600 Subject: [PATCH 15/15] Update readme.txt --- readme.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index 44e801ea..a659ea8c 100644 --- a/readme.txt +++ b/readme.txt @@ -44,8 +44,8 @@ You can also use `get_simple_local_avatar()` (with the same arguments) to retrei = 2.7.4 - 2023-02-17 = * **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)) -* **Security:** Bump `http-cache-semantics` from 4.1.0 to 4.1.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#191](https://github.com/10up/simple-local-avatars/pull/191)) +* **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)). +* **Security:** Bump `http-cache-semantics` from 4.1.0 to 4.1.1 (props [@dependabot](https://github.com/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#197](https://github.com/10up/simple-local-avatars/pull/197)). = 2.7.3 - 2023-01-16 = * **Fixed:** Issue causing fatal errors when avatars used on front end of site (props [@Rottinator](https://github.com/Rottinator), [@peterwilsoncc](https://github.com/peterwilsoncc), [@ravinderk](https://github.com/ravinderk), [@faisal-alvi](https://github.com/faisal-alvi) via [#187](https://github.com/10up/simple-local-avatars/pull/187)).