From 2573ae37c7588df58ddc99739053b73ec084d29d Mon Sep 17 00:00:00 2001 From: Lai Power Date: Fri, 17 Mar 2023 22:34:28 +0000 Subject: [PATCH] updated plugin `Simple Local Avatars` version 2.7.4 --- .../includes/class-simple-local-avatars.php | 10 ++++++---- wp-content/plugins/simple-local-avatars/readme.txt | 8 +++++++- .../simple-local-avatars/simple-local-avatars.php | 4 ++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/wp-content/plugins/simple-local-avatars/includes/class-simple-local-avatars.php b/wp-content/plugins/simple-local-avatars/includes/class-simple-local-avatars.php index eeadfb58..2148b696 100644 --- a/wp-content/plugins/simple-local-avatars/includes/class-simple-local-avatars.php +++ b/wp-content/plugins/simple-local-avatars/includes/class-simple-local-avatars.php @@ -307,6 +307,8 @@ class Simple_Local_Avatars { $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 ) ) { @@ -524,13 +526,13 @@ class Simple_Local_Avatars { */ $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' ), ); } diff --git a/wp-content/plugins/simple-local-avatars/readme.txt b/wp-content/plugins/simple-local-avatars/readme.txt index 499e7533..a659ea8c 100644 --- a/wp-content/plugins/simple-local-avatars/readme.txt +++ b/wp-content/plugins/simple-local-avatars/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 @@ -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 [#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)). * **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)). diff --git a/wp-content/plugins/simple-local-avatars/simple-local-avatars.php b/wp-content/plugins/simple-local-avatars/simple-local-avatars.php index c22f99b7..9d89be42 100644 --- a/wp-content/plugins/simple-local-avatars/simple-local-avatars.php +++ b/wp-content/plugins/simple-local-avatars/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 @@ define( 'SLA_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 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' ) ) {