modified file smtp-mailer
This commit is contained in:
@ -275,7 +275,7 @@ class Simple_Local_Avatars {
|
||||
}
|
||||
|
||||
// Local only mode
|
||||
if ( ! $simple_local_avatar_url && ! empty( $this->options['only'] ) ) {
|
||||
if ( ! $simple_local_avatar_url ) {
|
||||
$args['url'] = $this->get_default_avatar_url( $args['size'] );
|
||||
}
|
||||
|
||||
@ -342,10 +342,13 @@ class Simple_Local_Avatars {
|
||||
}
|
||||
|
||||
// check rating
|
||||
$avatar_rating = get_user_meta( $user_id, $this->rating_key, true );
|
||||
$site_rating = get_option( 'avatar_rating' );
|
||||
$avatar_rating = get_user_meta( $user_id, $this->rating_key, true );
|
||||
$site_rating = get_option( 'avatar_rating' );
|
||||
$all_avatar_ratings = ! empty( $this->avatar_ratings ) && is_array( $this->avatar_ratings )
|
||||
? $this->avatar_ratings
|
||||
: array();
|
||||
if ( ! empty( $avatar_rating ) && 'G' !== $avatar_rating && $site_rating ) {
|
||||
$ratings = array_keys( $this->avatar_ratings );
|
||||
$ratings = array_keys( $all_avatar_ratings );
|
||||
$site_rating_weight = array_search( $site_rating, $ratings, true );
|
||||
$avatar_rating_weight = array_search( $avatar_rating, $ratings, true );
|
||||
if ( false !== $avatar_rating_weight && $avatar_rating_weight > $site_rating_weight ) {
|
||||
@ -910,7 +913,7 @@ class Simple_Local_Avatars {
|
||||
<div id="simple-local-avatar-photo" class="image-container" style="width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; flex-direction: column;">
|
||||
<?php
|
||||
add_filter( 'pre_option_avatar_rating', '__return_empty_string' ); // ignore ratings here
|
||||
echo wp_kses_post( get_simple_local_avatar( $profileuser->ID ) );
|
||||
echo get_simple_local_avatar( $profileuser->ID );
|
||||
remove_filter( 'pre_option_avatar_rating', '__return_empty_string' );
|
||||
?>
|
||||
<span class="spinner" id="simple-local-avatar-spinner"></span>
|
||||
@ -1042,7 +1045,7 @@ class Simple_Local_Avatars {
|
||||
// check for uploaded files
|
||||
if ( ! empty( $_FILES['simple-local-avatar']['name'] ) && 0 === $_FILES['simple-local-avatar']['error'] ) :
|
||||
|
||||
// need to be more secure since low privelege users can upload
|
||||
// need to be more secure since low privilege users can upload
|
||||
$allowed_mime_types = wp_get_mime_types();
|
||||
$file_mime_type = strtolower( $_FILES['simple-local-avatar']['type'] );
|
||||
|
||||
@ -1132,17 +1135,8 @@ class Simple_Local_Avatars {
|
||||
|
||||
$this->avatar_delete( $user_id ); // delete old images if successful
|
||||
|
||||
/**
|
||||
* Enable themes and other plugins to react to avatar deletions.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @param int $user_id Id of the user who's avatar was deleted.
|
||||
*/
|
||||
do_action( 'simple_local_avatar_deleted', $user_id );
|
||||
|
||||
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
||||
echo wp_kses_post( get_simple_local_avatar( $user_id ) );
|
||||
echo get_simple_local_avatar( $user_id );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1168,7 +1162,7 @@ class Simple_Local_Avatars {
|
||||
$this->assign_new_user_avatar( $media_id, $user_id );
|
||||
}
|
||||
|
||||
echo wp_kses_post( get_simple_local_avatar( $user_id ) );
|
||||
echo get_simple_local_avatar( $user_id );
|
||||
|
||||
die;
|
||||
}
|
||||
@ -1204,6 +1198,15 @@ class Simple_Local_Avatars {
|
||||
|
||||
delete_user_meta( $user_id, $this->user_key );
|
||||
delete_user_meta( $user_id, $this->rating_key );
|
||||
|
||||
/**
|
||||
* Enable themes and other plugins to react to avatar deletions.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @param int $user_id Id of the user who's avatar was deleted.
|
||||
*/
|
||||
do_action( 'simple_local_avatar_deleted', $user_id );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,10 +2,8 @@
|
||||
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.4
|
||||
Requires PHP: 7.4
|
||||
Stable tag: 2.7.7
|
||||
Tested up to: 6.5
|
||||
Stable tag: 2.7.8
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -33,7 +31,7 @@ Just edit a user profile, and scroll down to the new "Avatar" field. The plug-in
|
||||
|
||||
Use avatars in your theme using WordPress' built in `get_avatar()` function: [http://codex.wordpress.org/Function_Reference/get_avatar](http://codex.wordpress.org/Function_Reference/get_avatar "get_avatar function")
|
||||
|
||||
You can also use `get_simple_local_avatar()` (with the same arguments) to retreive local avatars a bit faster, but this will make your theme dependent on this plug-in.
|
||||
You can also use `get_simple_local_avatar()` (with the same arguments) to retrieve local avatars a bit faster, but this will make your theme dependent on this plug-in.
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
@ -47,6 +45,22 @@ No. Simple Local Avatars neither collects, stores, nor sends any PII data of vi
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.7.8 - 2024-05-06 =
|
||||
**Note that this release bumps the minimum required version of WordPress from 5.7 to 6.3.**
|
||||
|
||||
* **Added:** "Testing" section in the `CONTRIBUTING.md` file (props [@kmgalanakis](https://github.com/kmgalanakis), [@jeffpaul](https://github.com/jeffpaul) via [#274](https://github.com/10up/simple-local-avatars/pull/274)).
|
||||
* **Changed:** Bumped WordPress "tested up to" version 6.5 (props [@sudip-md](https://github.com/sudip-md), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul) via [#270](https://github.com/10up/simple-local-avatars/pull/270)).
|
||||
* **Changed:** Move `simple_local_avatar_deleted` action to `avatar_delete` (props [@lllopo](https://github.com/lllopo), [@faisal-alvi](https://github.com/faisal-alvi), [@dkotter](https://github.com/dkotter) via [#255](https://github.com/10up/simple-local-avatars/pull/255)).
|
||||
* **Changed:** Clean up NPM dependencies and update node to `v20` (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#257](https://github.com/10up/simple-local-avatars/pull/257)).
|
||||
* **Changed:** Update `CODEOWNERS` of the plugin (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#253](https://github.com/10up/simple-local-avatars/pull/253)).
|
||||
* **Changed:** Disabled auto sync pull requests with target branch (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#263](https://github.com/10up/simple-local-avatars/pull/263)).
|
||||
* **Changed:** Upgrade `download-artifact` from v3 to v4 (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#265](https://github.com/10up/simple-local-avatars/pull/265)).
|
||||
* **Changed:** Replaced `lee-dohm/no-response` with `actions/stale` to help with closing `no-response/stale` issues (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#266](https://github.com/10up/simple-local-avatars/pull/266)).
|
||||
* **Fixed:** Broken default avatar when `Local Avatars Only` is unchecked (props [@faisal-alvi](https://github.com/faisal-alvi), [@ankitguptaindia](https://github.com/ankitguptaindia), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#260](https://github.com/10up/simple-local-avatars/pull/260)).
|
||||
* **Fixed:** Ensure high-quality avatar preview on profile edit screen (props [@ocean90](https://github.com/ocean90), [@dkotter](https://github.com/dkotter) via [#273](https://github.com/10up/simple-local-avatars/pull/273)).
|
||||
* **Fixed:** Possible PHP warning (props [@BhargavBhandari90](https://github.com/BhargavBhandari90), [@dkotter](https://github.com/dkotter) via [#261](https://github.com/10up/simple-local-avatars/pull/261)).
|
||||
* **Fixed:** Fixed typos (props [@szepeviktor](https://github.com/szepeviktor), [@dkotter](https://github.com/dkotter) via [#268](https://github.com/10up/simple-local-avatars/pull/268)).
|
||||
|
||||
= 2.7.7 - 2023-12-13 =
|
||||
* **Fixed:** Revert the Host/Domain support for local avatar URL (props [@faisal-alvi](https://github.com/faisal-alvi), [@jakejackson1](https://github.com/jakejackson1), [@leogermani](https://github.com/leogermani), [@dkotter](https://github.com/dkotter) via [#247](https://github.com/10up/simple-local-avatars/pull/247)).
|
||||
* **Security:** Bump `axios` from 0.25.0 to 1.6.2 and `@wordpress/scripts` from 23.7.2 to 26.18.0 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#250](https://github.com/10up/simple-local-avatars/pull/250)).
|
||||
@ -245,6 +259,9 @@ No. Simple Local Avatars neither collects, stores, nor sends any PII data of vi
|
||||
|
||||
== Upgrade Notice ==
|
||||
|
||||
= 2.7.8 =
|
||||
**Note that this release bumps the minimum required version of WordPress from 5.7 to 6.3.**
|
||||
|
||||
= 2.6.0 =
|
||||
**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.**
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
* 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.7
|
||||
* Requires at least: 5.7
|
||||
* Version: 2.7.8
|
||||
* Requires at least: 6.3
|
||||
* Requires PHP: 7.4
|
||||
* Author: 10up
|
||||
* Author URI: https://10up.com
|
||||
@ -67,7 +67,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.7' );
|
||||
define( 'SLA_VERSION', '2.7.8' );
|
||||
define( 'SLA_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
|
||||
if ( ! defined( 'SLA_IS_NETWORK' ) ) {
|
||||
|
Reference in New Issue
Block a user