diff --git a/.github/workflows/push-asset-readme-update.yml b/.github/workflows/push-asset-readme-update.yml index 776ce043..92d55bb2 100644 --- a/.github/workflows/push-asset-readme-update.yml +++ b/.github/workflows/push-asset-readme-update.yml @@ -1,14 +1,16 @@ name: Plugin asset/readme update + on: push: branches: - trunk + jobs: trunk: name: Push to trunk runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Composer dependencies run: composer install --no-dev - name: Install node @@ -19,6 +21,7 @@ jobs: run: | npm install npm run build + - name: WordPress.org plugin asset/readme update uses: 10up/action-wordpress-plugin-asset-update@stable env: diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json new file mode 100644 index 00000000..27ddcc05 --- /dev/null +++ b/.wordpress-org/blueprints/blueprint.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "landingPage": "\/wp-admin\/options-discussion.php", + "preferredVersions": { + "php": "7.4", + "wp": "latest" + }, + "phpExtensionBundles": ["kitchen-sink"], + "features": { + "networking": true + }, + "steps": [ + { + "step": "login", + "username": "admin", + "password": "password" + }, + { + "step": "importFile", + "file": { + "resource": "url", + "url": "https:\/\/raw.githubusercontent.com\/10up\/simple-local-avatars\/073f1979d6addeb3eecd7fb8cf56efe9bcfa7007\/.wordpress-org\/blueprints\/demo-data.xml" + } + }, + { + "step": "installPlugin", + "pluginZipFile": { + "resource": "wordpress.org\/plugins", + "slug": "simple-local-avatars" + }, + "options": { + "activate": true + } + }, + { + "step": "setSiteOptions", + "options": { + "avatar_default": "simple_local_avatar", + "simple_local_avatars": { + "caps": 1, + "only": 1 + }, + "simple_local_avatar_default": 5 + } + } + ] +} diff --git a/.wordpress-org/blueprints/demo-data.xml b/.wordpress-org/blueprints/demo-data.xml new file mode 100644 index 00000000..9350b43e --- /dev/null +++ b/.wordpress-org/blueprints/demo-data.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + My WordPress Website + https://playground.wordpress.net + + Wed, 03 Jan 2024 17:06:28 +0000 + en-US + 1.2 + https://playground.wordpress.net + https://playground.wordpress.net + + 1 + + + https://wordpress.org/?v=6.4.2 + + + <![CDATA[8bits love]]> + https://playground.wordpress.net/?attachment_id=5 + Wed, 03 Jan 2024 16:59:46 +0000 + + https://playground.wordpress.net/wp-content/uploads/2024/01/4503001362_7255e57a75_o.jpg + + + 8bits Love" by MA!LO is licensed under CC BY-SA 2.0 ]]> + 5 + + + + + + + + + 0 + 0 + + + 0 + + + + + + + + + + + + + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md index 45293bcf..5051c21d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD +## [2.7.11] - 2024-07-18 +**Note that this release bumps the minimum required version of WordPress from 6.3 to 6.4.** + +### Changed +- Bumped WordPress "tested up to" version 6.6 and minimum version to 6.4 (props [@sudip-md](https://github.com/sudip-md), [@ankitguptaindia](https://github.com/ankitguptaindia), [@jeffpaul](https://github.com/jeffpaul) via [#289](https://github.com/10up/simple-local-avatars/pull/289), [#290](https://github.com/10up/simple-local-avatars/pull/290)). + +### Security +- Add nonce check when saving the default avatar ID (props [@faisal-alvi](https://github.com/faisal-alvi), [@aaemnnosttv](https://github.com/aaemnnosttv), [@rafiem](https://github.com/rafiem), [@dkotter](https://github.com/dkotter) via [GHSA-46pw-6m35-9m7x](https://github.com/10up/simple-local-avatars/security/advisories/GHSA-46pw-6m35-9m7x)). +- Bump `braces` from 3.0.2 to 3.0.3, `pac-resolver` from 7.0.0 to 7.0.1, `socks` from 2.7.1 to 2.8.3 and removes `ip` (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#286](https://github.com/10up/simple-local-avatars/pull/286)). +- Bump `ws` from 7.5.9 to 7.5.10 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#287](https://github.com/10up/simple-local-avatars/pull/287)). + ## [2.7.10] - 2024-05-24 ### Fixed - Fix Default Avatar Fallback (props [@amirhossein7](https://profiles.wordpress.org/amirhossein7/), [@faisal-alvi](https://github.com/faisal-alvi), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#281](https://github.com/10up/simple-local-avatars/pull/281)). @@ -325,6 +336,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.11]: https://github.com/10up/simple-local-avatars/compare/2.7.10...2.7.11 [2.7.10]: https://github.com/10up/simple-local-avatars/compare/2.7.9...2.7.10 [2.7.9]: https://github.com/10up/simple-local-avatars/compare/2.7.8...2.7.9 [2.7.8]: https://github.com/10up/simple-local-avatars/compare/2.7.7...2.7.8 diff --git a/CREDITS.md b/CREDITS.md index 73a5083e..b7cdfa59 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), [Bhargav Bhandari (@BhargavBhandari90)](https://github.com/BhargavBhandari90), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Jon Christensen (@Firestorm980)](https://github.com/Firestorm980), [Joseph Richardson (@EHLOVader)](https://github.com/EHLOVader), [Dominik Schilling (@ocean90)](https://github.com/ocean90), [Jake Jackson (@jakejackson1)](https://github.com/jakejackson1), [Leo Germani (@leogermani)](https://github.com/leogermani), [Viktor Szépe (@szepeviktor)](https://github.com/szepeviktor), [horrormovies.gr (@horrormoviesgr)](https://profiles.wordpress.org/horrormoviesgr/), [inpeaks (@inpeaks)](https://profiles.wordpress.org/inpeaks/), [lillylark (@lillylark)](https://profiles.wordpress.org/lillylark/), [Rafał Całka (@rafaucau)](https://github.com/rafaucau), [janrenn (@janrenn)](https://profiles.wordpress.org/janrenn/), [Amir Hossein (amirhossein7)](https://profiles.wordpress.org/amirhossein7/), [Sumit Bagthariya (@qasumitbagthariya)](https://github.com/qasumitbagthariya/). +[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), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Jon Christensen (@Firestorm980)](https://github.com/Firestorm980), [Joseph Richardson (@EHLOVader)](https://github.com/EHLOVader), [Dominik Schilling (@ocean90)](https://github.com/ocean90), [Jake Jackson (@jakejackson1)](https://github.com/jakejackson1), [Leo Germani (@leogermani)](https://github.com/leogermani), [Viktor Szépe (@szepeviktor)](https://github.com/szepeviktor), [horrormovies.gr (@horrormoviesgr)](https://profiles.wordpress.org/horrormoviesgr/), [inpeaks (@inpeaks)](https://profiles.wordpress.org/inpeaks/), [lillylark (@lillylark)](https://profiles.wordpress.org/lillylark/), [Rafał Całka (@rafaucau)](https://github.com/rafaucau), [janrenn (@janrenn)](https://profiles.wordpress.org/janrenn/), [Amir Hossein (amirhossein7)](https://profiles.wordpress.org/amirhossein7/), [Sumit Bagthariya (@qasumitbagthariya)](https://github.com/qasumitbagthariya), [Sudip Dadhaniya (@sudip-md)](https://github.com/sudip-md), [Evan Mattson (@aaemnnosttv)](https://github.com/aaemnnosttv), [Rafie Muhammad (@rafiem)](https://github.com/rafiem). ## Libraries diff --git a/README.md b/README.md index ccadc38e..9b410c88 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ > Adds an avatar upload field to user profiles. Generates requested sizes on demand just like Gravatar! -[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) ![PHPCompatibility](https://github.com/10up/simple-local-avatars/actions/workflows/php-compatibility.yml/badge.svg) [![Release Version](https://img.shields.io/github/release/10up/simple-local-avatars.svg)](https://github.com/10up/simple-local-avatars/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/simple-local-avatars?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/simple-local-avatars.svg)](https://github.com/10up/simple-local-avatars/blob/develop/LICENSE.md) +[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/simple-local-avatars?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/simple-local-avatars.svg)](https://github.com/10up/simple-local-avatars/blob/develop/LICENSE.md) [![WordPress Playground Demo](https://img.shields.io/wordpress/plugin/v/simple-local-avatars?logo=wordpress&logoColor=FFFFFF&label=Playground%20Demo&labelColor=3858E9&color=3858E9)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/10up/simple-local-avatars/add/playground/.wordpress-org/blueprints/blueprint.json) + +[![E2E Tests](https://github.com/10up/simple-local-avatars/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/simple-local-avatars/actions/workflows/cypress.yml) [![Linting](https://github.com/10up/simple-local-avatars/actions/workflows/lint.yml/badge.svg)](https://github.com/10up/simple-local-avatars/actions/workflows/lint.yml) ![PHPCompatibility](https://github.com/10up/simple-local-avatars/actions/workflows/php-compatibility.yml/badge.svg) [![PHPUnit](https://github.com/10up/simple-local-avatars/actions/workflows/test.yml/badge.svg)](https://github.com/10up/simple-local-avatars/actions/workflows/test.yml) [![Dependency Review](https://github.com/10up/simple-local-avatars/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/simple-local-avatars/actions/workflows/dependency-review.yml) ## Features diff --git a/includes/class-simple-local-avatars.php b/includes/class-simple-local-avatars.php index f7fe83d6..dd2de71c 100644 --- a/includes/class-simple-local-avatars.php +++ b/includes/class-simple-local-avatars.php @@ -65,9 +65,9 @@ class Simple_Local_Avatars { public function __construct() { $this->add_hooks(); - $this->options = (array) get_option( 'simple_local_avatars' ); - $this->user_key = 'simple_local_avatar'; - $this->rating_key = 'simple_local_avatar_rating'; + $this->options = (array) get_option( 'simple_local_avatars' ); + $this->user_key = 'simple_local_avatar'; + $this->rating_key = 'simple_local_avatar_rating'; if ( ! $this->is_avatar_shared() // Are we sharing avatars? @@ -432,7 +432,7 @@ public function get_simple_local_avatar_url( $id_or_email, $size ) { $dest_file_url = ''; if ( false !== strpos( $dest_file, $upload_path['basedir'] ) ) { $dest_file_url = str_replace( $upload_path['basedir'], $upload_path['baseurl'], $dest_file ); - } else if ( is_multisite() && false !== strpos( $dest_file, ABSPATH . 'wp-content/uploads' ) ) { + } elseif ( is_multisite() && false !== strpos( $dest_file, ABSPATH . 'wp-content/uploads' ) ) { $dest_file_url = str_replace( ABSPATH . 'wp-content/uploads', network_site_url( '/wp-content/uploads' ), $dest_file ); } @@ -557,13 +557,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', 'simple-local-avatars' ), /* 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', 'simple-local-avatars' ), /* 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', 'simple-local-avatars' ), /* 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', 'simple-local-avatars' ), ); } @@ -702,7 +702,7 @@ public function show_network_settings() { $this->avatar_settings_field( array( 'key' => 'only', - 'desc' => __( 'Only allow local avatars (still uses Gravatar for default avatars) ', 'simple-local-avatars' ), + 'desc' => __( 'Only allow local avatars (still uses Gravatar for default avatars)', 'simple-local-avatars' ), ) ); ?> @@ -950,7 +950,7 @@ public function edit_user_profile( $profileuser ) { if ( ! is_admin() || ! current_user_can( 'upload_files' ) ) { ?>

-
+

@@ -976,10 +976,10 @@ public function edit_user_profile( $profileuser ) { - +
simple_local_avatar ) ); ?>> - + simple_local_avatar_rating ) || ! array_key_exists( $profileuser->simple_local_avatar_rating, $this->avatar_ratings ) ) { $profileuser->simple_local_avatar_rating = 'G'; @@ -1035,7 +1035,7 @@ public function assign_new_user_avatar( $url_or_media_id, $user_id ) { * * @param int $user_id Id of the user who's avatar was updated */ - do_action( 'simple_local_avatar_updated' , $user_id ); + do_action( 'simple_local_avatar_updated', $user_id ); } /** @@ -1064,6 +1064,7 @@ public function edit_user_profile_update( $user_id ) { $max_upload_size = $this->upload_size_limit( wp_max_upload_size() ); if ( $_FILES['simple-local-avatar']['size'] > $max_upload_size ) { + // translators: %s: Formatted size. $this->avatar_upload_error = sprintf( __( 'Max allowed avatar size is %s', 'simple-local-avatars' ), size_format( $max_upload_size ) ); add_action( 'user_profile_update_errors', array( $this, 'user_profile_update_errors' ) ); return; @@ -1442,9 +1443,9 @@ private function clear_user_avatar_cache( $local_avatars, $user_id, $media_id ) $file_name_data = pathinfo( get_attached_file( $media_id ) ); } - $file_dir_name = $file_name_data['dirname']; - $file_name = $file_name_data['filename']; - $file_ext = $file_name_data['extension']; + $file_dir_name = $file_name_data['dirname']; + $file_name = $file_name_data['filename']; + $file_ext = $file_name_data['extension']; foreach ( $local_avatars as $local_avatars_key => $local_avatar_value ) { if ( ! in_array( $local_avatars_key, [ 'media_id', 'full' ], true ) ) { $file_size_path = sprintf( '%1$s/%2$s-%3$sx%3$s.%4$s', $file_dir_name, $file_name, $local_avatars_key, $file_ext ); @@ -1476,8 +1477,9 @@ public function add_avatar_default_field( $defaults ) { ?> - -

+ + +

(https://10up.com)", diff --git a/readme.txt b/readme.txt index f48514e0..3af568e7 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 Tested up to: 6.6 -Stable tag: 2.7.10 +Stable tag: 2.7.11 License: GPL-2.0-or-later License URI: https://spdx.org/licenses/GPL-2.0-or-later.html @@ -45,6 +45,14 @@ No. Simple Local Avatars neither collects, stores, nor sends any PII data of vi == Changelog == += 2.7.11 - 2024-07-18 = +**Note that this release bumps the minimum required version of WordPress from 6.3 to 6.4.** + +* **Changed:** Bumped WordPress "tested up to" version 6.6 and minimum version to 6.4 (props [@sudip-md](https://github.com/sudip-md), [@ankitguptaindia](https://github.com/ankitguptaindia), [@jeffpaul](https://github.com/jeffpaul) via [#289](https://github.com/10up/simple-local-avatars/pull/289), [#290](https://github.com/10up/simple-local-avatars/pull/290)). +* **Security:** Add nonce check when saving the default avatar ID (props [@faisal-alvi](https://github.com/faisal-alvi), [@aaemnnosttv](https://github.com/aaemnnosttv), [@rafiem](https://github.com/rafiem), [@dkotter](https://github.com/dkotter) via [GHSA-46pw-6m35-9m7x](https://github.com/10up/simple-local-avatars/security/advisories/GHSA-46pw-6m35-9m7x)). +* **Security:** Bump `braces` from 3.0.2 to 3.0.3, `pac-resolver` from 7.0.0 to 7.0.1, `socks` from 2.7.1 to 2.8.3 and removes `ip` (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#286](https://github.com/10up/simple-local-avatars/pull/286)). +* **Security:** Bump `ws` from 7.5.9 to 7.5.10 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#287](https://github.com/10up/simple-local-avatars/pull/287)). + = 2.7.10 - 2024-05-24 = * **Fixed:** Fix Default Avatar Fallback (props [@amirhossein7](https://profiles.wordpress.org/amirhossein7/), [@faisal-alvi](https://github.com/faisal-alvi), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya/) via [#281](https://github.com/10up/simple-local-avatars/pull/281)). * **Security:** Bump `express` from 4.18.2 to 4.19.2 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#269](https://github.com/10up/simple-local-avatars/pull/269)). @@ -141,6 +149,9 @@ No. Simple Local Avatars neither collects, stores, nor sends any PII data of vi == Upgrade Notice == += 2.7.11 = +**Note that this release bumps the minimum required version of WordPress from 6.3 to 6.4.** + = 2.7.8 = **Note that this release bumps the minimum required version of WordPress from 5.7 to 6.3.** diff --git a/simple-local-avatars.php b/simple-local-avatars.php index a82d78e6..c0558c15 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.10 + * Version: 2.7.11 * Requires at least: 6.4 * Requires PHP: 7.4 * Author: 10up @@ -35,7 +35,7 @@ require_once dirname( __FILE__ ) . '/includes/class-simple-local-avatars.php'; // Global constants. -define( 'SLA_VERSION', '2.7.10' ); +define( 'SLA_VERSION', '2.7.11' ); define( 'SLA_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); if ( ! defined( 'SLA_IS_NETWORK' ) ) {