diff --git a/wp-content/plugins/simple-local-avatars/dist/simple-local-avatars.asset.php b/wp-content/plugins/simple-local-avatars/dist/simple-local-avatars.asset.php index f014bd08..9912c1a6 100644 --- a/wp-content/plugins/simple-local-avatars/dist/simple-local-avatars.asset.php +++ b/wp-content/plugins/simple-local-avatars/dist/simple-local-avatars.asset.php @@ -1 +1 @@ - array(), 'version' => '743de2221cd3b95dfce2abc7e2a95842'); \ No newline at end of file + array(), 'version' => 'fdc7a56cb4a6a7999938'); diff --git a/wp-content/plugins/simple-local-avatars/dist/simple-local-avatars.js b/wp-content/plugins/simple-local-avatars/dist/simple-local-avatars.js index 9b3c8504..12d54c37 100644 --- a/wp-content/plugins/simple-local-avatars/dist/simple-local-avatars.js +++ b/wp-content/plugins/simple-local-avatars/dist/simple-local-avatars.js @@ -1 +1 @@ -!function(){let a,e,t,r,i,l,s,o,n,c=!1;function p(a){void 0===e&&(t=document.getElementById("simple-local-avatar-ratings"),e=jQuery(document.getElementById("simple-local-avatar-spinner")),r=document.getElementById("simple-local-avatar-photo"),i=jQuery(t).closest("form").find("input[type=submit]")),"unlock"===a?(c=!1,i.removeAttr("disabled"),e.hide()):(c=!0,i.attr("disabled","disabled"),e.show())}function m(a,e){const t=e.get("control"),r=a.get("width"),i=a.get("height");let l=parseInt(t.params.width,10),s=parseInt(t.params.height,10);const o=l/s;e.set("canSkipCrop",!t.mustBeCropped(!1,!1,l,s,r,i));const n=l,c=s;r/i>o?(s=i,l=s*o):(l=r,s=l/o);const p=(r-l)/2,m=(i-s)/2;return{handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:r,imageHeight:i,minWidth:n>l?l:n,minHeight:c>s?s:c,x1:p,y1:m,x2:l+p,y2:s+m,aspectRatio:`${l}:${s}`}}function d(a,e,i,l){const s={};s.url=a,s.thumbnail_url=a,s.timestamp=_.now(),e&&(s.attachment_id=e),i&&(s.width=i),l&&(s.height=l),p("lock"),jQuery.post(ajaxurl,{action:"assign_simple_local_avatar_media",media_id:e,user_id:i10n_SimpleLocalAvatars.user_id,_wpnonce:i10n_SimpleLocalAvatars.mediaNonce}).done((function(a){""!==a&&(r.innerHTML=a,jQuery("#simple-local-avatar-remove").show(),t.disabled=!1)})).always((function(){p("unlock")}))}jQuery(document).ready((function(e){s=e("#simple-local-avatar"),l=e("#simple-local-avatar-photo img"),n=l.attr("src"),t=e("#simple-local-avatar-ratings"),r=e("#simple-local-avatar-photo"),e("#simple-local-avatar-media").on("click",(function(e){if(e.preventDefault(),c)return;const i={id:"control-id",params:{flex_width:!1,flex_height:!1,width:200,height:200},mustBeCropped:function(a,e,t,r,i,l){return i!==t||l!==r}};a=wp.media({button:{text:i10n_SimpleLocalAvatars.selectCrop,close:!1},states:[new wp.media.controller.Library({title:i10n_SimpleLocalAvatars.selectCrop,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:200,suggestedHeight:200}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:m,control:i})]}),a.on("cropped",(function(a){const{url:e}=a;d(e,a.id,a.width,a.height)})),a.on("skippedcrop",(function(a){const e=a.get("url"),t=a.get("width"),r=a.get("height");d(e,a.id,t,r)})),a.on("select",(function(){const e=a.state().get("selection").first().toJSON();var l;i.params.width!==e.width||i.params.height!==e.height||i.params.flex_width||i.params.flex_height?a.setState("cropper"):(e.dst_width=e.width,e.dst_height=e.height,l=e,p("lock"),jQuery.post(ajaxurl,{action:"assign_simple_local_avatar_media",media_id:l.id,user_id:i10n_SimpleLocalAvatars.user_id,_wpnonce:i10n_SimpleLocalAvatars.mediaNonce}).done((function(a){""!==a&&(r.innerHTML=a,jQuery("#simple-local-avatar-remove").show(),t.disabled=!1,p("unlock"))})).always((function(){p("unlock")})),a.close())})),a.open()})),e("#simple-local-avatar-remove").on("click",(function(a){a.preventDefault(),c||(p("lock"),e.get(ajaxurl,{action:"remove_simple_local_avatar",user_id:i10n_SimpleLocalAvatars.user_id,_wpnonce:i10n_SimpleLocalAvatars.deleteNonce}).done((function(a){""!==a&&(r.innerHTML=a,e("#simple-local-avatar-remove").hide(),t.disabled=!0)})).always((function(){p("unlock")})))})),s.on("change",(function(a){l.attr("srcset",""),l.attr("height","auto"),URL.revokeObjectURL(o),a.target.files.length>0?(o=URL.createObjectURL(a.target.files[0]),l.attr("src",o)):l.attr("src",n)})),e(document.getElementById("simple-local-avatars-migrate-from-wp-user-avatar")).on("click",(function(a){a.preventDefault(),jQuery.post(ajaxurl,{action:"migrate_from_wp_user_avatar",migrateFromWpUserAvatarNonce:i10n_SimpleLocalAvatars.migrateFromWpUserAvatarNonce}).always((function(){e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").empty(),e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").text(i10n_SimpleLocalAvatars.migrateFromWpUserAvatarProgress)})).done((function(a){e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").empty();const t=e.parseJSON(a).count;0===t&&e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").text(i10n_SimpleLocalAvatars.migrateFromWpUserAvatarFailure),t>0&&e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").text(i10n_SimpleLocalAvatars.migrateFromWpUserAvatarSuccess+": "+t),setTimeout((function(){e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").empty()}),5e3)}))}));const i=e("#clear_cache_btn"),u=e("#clear_cache_message"),v=e("#simple-local-avatar-default"),g=e("#simple-local-avatar-file-url"),h=e("#simple-local-avatar-file-id");function f(){i.find("span").remove(),i.removeClass("disabled")}function _(a,t){t.step=a,e.ajax({url:ajaxurl,dataType:"json",data:t,method:"POST",success:function(a){if(a.success)return"done"===a.data.step?(u.text(a.data.message),f()):(u.text(a.data.message),_(parseInt(a.data.step,10),t)),!1;u.text(i10n_SimpleLocalAvatars.clearCacheError),f()},error:function(){u.text(i10n_SimpleLocalAvatars.clearCacheError),f()}})}if(i.on("click",(function(a){a.preventDefault(),i.addClass("disabled"),i.append(''),_(1,{action:"sla_clear_user_cache",nonce:i10n_SimpleLocalAvatars.cacheNonce})})),v.click((function(a){a.preventDefault();var t=e(this),r=wp.media({title:i10n_SimpleLocalAvatars.insertMediaTitle,multiple:!1,library:{type:"image"}}).open().on("select",(function(a){var e,i,l,s=r.state().get("selection").first(),o=null===(e=s=s.toJSON())||void 0===e||null===(i=e.sizes)||void 0===i||null===(l=i.thumbnail)||void 0===l?void 0:l.url;void 0===o&&(o=s.url);var n=t.parent().find("img.avatar");n.show(),n.attr("src",o),n.attr("srcset",o),g.val(o),h.val(s.id)}))})),g.length&&""!==g.val()){var w=g.parent().find("img.avatar");w.attr("src",g.val()),w.attr("srcset",g.val())}""===h.val()&&h.parent().find("img.avatar").hide()}))}(); \ No newline at end of file +(()=>{let a,e,t,r,i,l,s,o,n,c=!1;function m(a){void 0===e&&(t=document.getElementById("simple-local-avatar-ratings"),e=jQuery(document.getElementById("simple-local-avatar-spinner")),r=document.getElementById("simple-local-avatar-photo"),i=jQuery(t).closest("form").find("input[type=submit]")),"unlock"===a?(c=!1,i.removeAttr("disabled"),e.hide()):(c=!0,i.attr("disabled","disabled"),e.show())}function p(a,e){const t=e.get("control"),r=a.get("width"),i=a.get("height");let l=parseInt(t.params.width,10),s=parseInt(t.params.height,10);const o=l/s;e.set("canSkipCrop",!0);const n=l,c=s;r/i>o?(s=i,l=s*o):(l=r,s=l/o);const m=(r-l)/2,p=(i-s)/2;return{handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:r,imageHeight:i,minWidth:n>l?l:n,minHeight:c>s?s:c,x1:m,y1:p,x2:l+m,y2:s+p,aspectRatio:`${l}:${s}`}}function d(a,e,i,l){const s={};s.url=a,s.thumbnail_url=a,s.timestamp=_.now(),e&&(s.attachment_id=e),i&&(s.width=i),l&&(s.height=l),m("lock"),jQuery.post(i10n_SimpleLocalAvatars.ajaxurl,{action:"assign_simple_local_avatar_media",media_id:e,user_id:i10n_SimpleLocalAvatars.user_id,_wpnonce:i10n_SimpleLocalAvatars.mediaNonce}).done((function(a){""!==a&&(r.innerHTML=a,jQuery("#simple-local-avatar-remove").show(),t.disabled=!1)})).always((function(){m("unlock")}))}jQuery(document).ready((function(e){s=e("#simple-local-avatar"),l=e("#simple-local-avatar-photo img"),n=l.attr("src"),t=e("#simple-local-avatar-ratings"),r=e("#simple-local-avatar-photo"),e("#simple-local-avatar-media").on("click",(function(e){if(e.preventDefault(),c)return;const i={id:"control-id",params:{flex_width:!0,flex_height:!0,width:200,height:200}};a=wp.media({button:{text:i10n_SimpleLocalAvatars.selectCrop,close:!1},states:[new wp.media.controller.Library({title:i10n_SimpleLocalAvatars.selectCrop,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:200,suggestedHeight:200}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:p,control:i})]}),a.on("cropped",(function(a){const{url:e}=a;d(e,a.id,a.width,a.height)})),a.on("skippedcrop",(function(a){const e=a.get("url"),t=a.get("width"),r=a.get("height");d(e,a.id,t,r)})),a.on("select",(function(){const e=a.state().get("selection").first().toJSON();var l;i.params.width!==e.width||i.params.height!==e.height||i.params.flex_width||i.params.flex_height?a.setState("cropper"):(e.dst_width=e.width,e.dst_height=e.height,l=e,m("lock"),jQuery.post(i10n_SimpleLocalAvatars.ajaxurl,{action:"assign_simple_local_avatar_media",media_id:l.id,user_id:i10n_SimpleLocalAvatars.user_id,_wpnonce:i10n_SimpleLocalAvatars.mediaNonce}).done((function(a){""!==a&&(r.innerHTML=a,jQuery("#simple-local-avatar-remove").show(),t.disabled=!1,m("unlock"))})).always((function(){m("unlock")})),a.close())})),a.open()})),e("#simple-local-avatar-remove").on("click",(function(a){a.preventDefault(),c||(m("lock"),e.get(i10n_SimpleLocalAvatars.ajaxurl,{action:"remove_simple_local_avatar",user_id:i10n_SimpleLocalAvatars.user_id,_wpnonce:i10n_SimpleLocalAvatars.deleteNonce}).done((function(a){""!==a&&(r.innerHTML=a,e("#simple-local-avatar-remove").hide(),t.disabled=!0)})).always((function(){m("unlock")})))})),s.on("change",(function(a){l.attr("srcset",""),l.attr("height","auto"),URL.revokeObjectURL(o),a.target.files.length>0?(o=URL.createObjectURL(a.target.files[0]),l.attr("src",o)):l.attr("src",n)})),e(document.getElementById("simple-local-avatars-migrate-from-wp-user-avatar")).on("click",(function(a){a.preventDefault(),jQuery.post(i10n_SimpleLocalAvatars.ajaxurl,{action:"migrate_from_wp_user_avatar",migrateFromWpUserAvatarNonce:i10n_SimpleLocalAvatars.migrateFromWpUserAvatarNonce}).always((function(){e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").empty(),e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").text(i10n_SimpleLocalAvatars.migrateFromWpUserAvatarProgress)})).done((function(a){e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").empty();const t=e.parseJSON(a).count;0===t&&e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").text(i10n_SimpleLocalAvatars.migrateFromWpUserAvatarFailure),t>0&&e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").text(i10n_SimpleLocalAvatars.migrateFromWpUserAvatarSuccess+": "+t),setTimeout((function(){e(".simple-local-avatars-migrate-from-wp-user-avatar-progress").empty()}),5e3)}))}));const i=e("#clear_cache_btn"),u=e("#clear_cache_message"),v=e("#simple-local-avatar-default"),g=e("#simple-local-avatar-file-url"),h=e("#simple-local-avatar-file-id");function _(){i.find("span").remove(),i.removeClass("disabled")}function f(a,t){t.step=a,e.ajax({url:i10n_SimpleLocalAvatars.ajaxurl,dataType:"json",data:t,method:"POST",success:function(a){if(a.success)return"done"===a.data.step?(u.text(a.data.message),_()):(u.text(a.data.message),f(parseInt(a.data.step,10),t)),!1;u.text(i10n_SimpleLocalAvatars.clearCacheError),_()},error:function(){u.text(i10n_SimpleLocalAvatars.clearCacheError),_()}})}if(i.on("click",(function(a){a.preventDefault(),i.addClass("disabled"),i.append(''),f(1,{action:"sla_clear_user_cache",nonce:i10n_SimpleLocalAvatars.cacheNonce})})),v.click((function(a){a.preventDefault();var t=e(this),r=wp.media({title:i10n_SimpleLocalAvatars.insertMediaTitle,multiple:!1,library:{type:"image"}}).open().on("select",(function(a){var e=r.state().get("selection").first(),i=(e=e.toJSON())?.sizes?.thumbnail?.url;void 0===i&&(i=e.url);var l=t.parent().find("img.avatar");l.show(),l.attr("src",i),l.attr("srcset",i),g.val(i),h.val(e.id)}))})),g.length&&""!==g.val()){var w=g.parent().find("img.avatar");w.attr("src",g.val()),w.attr("srcset",g.val())}""===h.val()&&h.parent().find("img.avatar").hide()}))})(); \ No newline at end of file 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 318d0f0d..0a2cdb1c 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 @@ -80,7 +80,7 @@ class Simple_Local_Avatars { && ( ( // And either an ajax request not in the network admin. defined( 'DOING_AJAX' ) && DOING_AJAX - && ! preg_match( '#^' . network_admin_url() . '#i', $_SERVER['HTTP_REFERER'] ) + && isset( $_SERVER['HTTP_REFERER'] ) && ! preg_match( '#^' . network_admin_url() . '#i', $_SERVER['HTTP_REFERER'] ) ) || ( // Or normal request not in the network admin. @@ -99,6 +99,7 @@ class Simple_Local_Avatars { * Register actions and filters. */ public function add_hooks() { + global $pagenow; add_filter( 'plugin_action_links_' . SLA_PLUGIN_BASENAME, array( $this, 'plugin_filter_action_links' ) ); @@ -107,7 +108,10 @@ class Simple_Local_Avatars { add_action( 'admin_init', array( $this, 'admin_init' ) ); - add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); + // Load the JS on BE & FE both, in order to support third party plugins like bbPress. + add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); + add_action( 'show_user_profile', array( $this, 'edit_user_profile' ) ); add_action( 'edit_user_profile', array( $this, 'edit_user_profile' ) ); @@ -130,6 +134,14 @@ class Simple_Local_Avatars { add_filter( 'avatar_defaults', array( $this, 'add_avatar_default_field' ) ); add_action( 'wpmu_new_blog', array( $this, 'set_defaults' ) ); + + if ( 'profile.php' === $pagenow ) { + add_filter( 'media_view_strings', function ( $strings ) { + $strings['skipCropping'] = esc_html__( 'Default Crop', 'simple-local-avatars' ); + + return $strings; + }, 10, 1 ); + } } /** @@ -262,11 +274,42 @@ class Simple_Local_Avatars { if ( ! empty( $args['url'] ) ) { $args['found_avatar'] = true; + + // If custom alt text isn't passed, pull alt text from the local image. + if ( empty( $args['alt'] ) ) { + $args['alt'] = $this->get_simple_local_avatar_alt( $id_or_email ); + } } return $args; } + /** + * Get a user ID from certain possible values. + * + * @since 2.5.0 + * + * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user ID, Gravatar MD5 hash, + * user email, WP_User object, WP_Post object, or WP_Comment object. + * @return int|false + */ + public function get_user_id( $id_or_email ) { + $user_id = false; + + if ( is_numeric( $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_Post && ! empty( $id_or_email->post_author ) ) { + $user_id = (int) $id_or_email->post_author; + } elseif ( is_string( $id_or_email ) ) { + $user = get_user_by( 'email', $id_or_email ); + $user_id = $user ? $user->ID : ''; + } + + return $user_id; + } + /** * Get local avatar url. * @@ -277,16 +320,7 @@ class Simple_Local_Avatars { * @param int $size Requested avatar size. */ public function get_simple_local_avatar_url( $id_or_email, $size ) { - if ( is_numeric( $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_Post && ! empty( $id_or_email->post_author ) ) { - $user_id = (int) $id_or_email->post_author; - } elseif ( is_string( $id_or_email ) ) { - $user = get_user_by( 'email', $id_or_email ); - $user_id = $user ? $user->ID : ''; - } + $user_id = $this->get_user_id( $id_or_email ); if ( empty( $user_id ) ) { return ''; @@ -354,7 +388,15 @@ class Simple_Local_Avatars { $dest_file = $editor->generate_filename(); $saved = $editor->save( $dest_file ); if ( ! is_wp_error( $saved ) ) { - $local_avatars[ $size ] = str_replace( $upload_path['basedir'], $upload_path['baseurl'], $dest_file ); + // Transform the destination file path into URL. + $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' ) ) { + $dest_file_url = str_replace( ABSPATH . 'wp-content/uploads', network_site_url( '/wp-content/uploads' ), $dest_file ); + } + + $local_avatars[ $size ] = $dest_file_url; } } } @@ -372,6 +414,31 @@ class Simple_Local_Avatars { return esc_url( $local_avatars[ $size ] ); } + /** + * Get local avatar alt text. + * + * @since 2.5.0 + * + * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user ID, Gravatar MD5 hash, + * user email, WP_User object, WP_Post object, or WP_Comment object. + * @return string + */ + public function get_simple_local_avatar_alt( $id_or_email ) { + $user_id = $this->get_user_id( $id_or_email ); + + if ( empty( $user_id ) ) { + return ''; + } + + // Fetch local avatar from meta and make sure we have a media ID. + $local_avatars = get_user_meta( $user_id, 'simple_local_avatar', true ); + if ( empty( $local_avatars['media_id'] ) ) { + return ''; + } + + return esc_attr( get_post_meta( $local_avatars['media_id'], '_wp_attachment_image_alt', true ) ); + } + /** * Get default avatar url * @@ -620,7 +687,7 @@ class Simple_Local_Avatars { * * @param string $hook_suffix Page hook */ - public function admin_enqueue_scripts( $hook_suffix ) { + public function enqueue_scripts( $hook_suffix ) { /** * Filter the admin screens where we enqueue our scripts. @@ -631,6 +698,11 @@ class Simple_Local_Avatars { */ $screens = apply_filters( 'simple_local_avatars_admin_enqueue_scripts', array( 'profile.php', 'user-edit.php', 'options-discussion.php' ), $hook_suffix ); + // Allow SLA actions on a bbPress profile edit page at FE. + if ( function_exists( 'bbp_is_user_home_edit' ) && bbp_is_user_home_edit() ) { + $hook_suffix = 'profile.php'; + } + if ( ! in_array( $hook_suffix, $screens, true ) ) { return; } @@ -649,6 +721,7 @@ class Simple_Local_Avatars { 'simple-local-avatars', 'i10n_SimpleLocalAvatars', array( + 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'user_id' => $user_id, 'insertIntoPost' => __( 'Set as avatar', 'simple-local-avatars' ), 'selectCrop' => __( 'Select avatar and Crop', 'simple-local-avatars' ), @@ -779,7 +852,8 @@ class Simple_Local_Avatars {


@@ -889,6 +963,14 @@ class Simple_Local_Avatars { include_once ABSPATH . 'wp-admin/includes/media.php'; } + // front end (plugin bbPress etc) support + if ( ! function_exists( 'wp_handle_upload' ) ) { + include_once ABSPATH . 'wp-admin/includes/file.php'; + } + if ( ! function_exists( 'wp_generate_attachment_metadata' ) ) { + include_once ABSPATH . 'wp-admin/includes/image.php'; + } + // allow developers to override file size upload limit for avatars add_filter( 'upload_size_limit', array( $this, 'upload_size_limit' ) ); @@ -1248,7 +1330,13 @@ class Simple_Local_Avatars { */ private function clear_user_avatar_cache( $local_avatars, $user_id, $media_id ) { if ( ! empty( $media_id ) ) { - $file_name_data = pathinfo( wp_get_original_image_path( $media_id ) ); + // In order to support WP 4.9. + if ( function_exists( 'wp_get_original_image_path' ) ) { + $file_name_data = pathinfo( wp_get_original_image_path( $media_id ) ); + } else { + $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']; @@ -1306,10 +1394,10 @@ class Simple_Local_Avatars { update_option( 'simple_local_avatar_default', $file_id ); } } - + /** * Migrate the user's avatar data from WP User Avatar/ProfilePress - * + * * This function creates a new option in the wp_options table to store the processed user IDs * so that we can run this command multiple times without processing the same user over and over again. * diff --git a/wp-content/plugins/simple-local-avatars/readme.txt b/wp-content/plugins/simple-local-avatars/readme.txt index 38a0a2f6..536e5308 100644 --- a/wp-content/plugins/simple-local-avatars/readme.txt +++ b/wp-content/plugins/simple-local-avatars/readme.txt @@ -1,13 +1,13 @@ === Simple Local Avatars === -Contributors: jakemgold, 10up, thinkoomph -Donate link: https://10up.com/plugins/simple-local-avatars-wordpress/ -Tags: avatar, gravatar, user photos, users, profile +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: 4.6 -Tested up to: 6.0 -Requires PHP: 5.6 -Stable tag: 2.4.0 -License: GPLv2 or later -License URI: http://www.gnu.org/licenses/gpl-2.0.html +Tested up to: 6.0 +Requires PHP: 5.6 +Stable tag: 2.5.0 +License: GPLv2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html Adds an avatar upload field to user profiles. Generates requested sizes on demand just like Gravatar! @@ -41,6 +41,15 @@ You can also use `get_simple_local_avatar()` (with the same arguments) to retrei == Changelog == += 2.5.0 - 2022-06-24 = +* **Added:** Skip cropping button (props [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul), [@dinhtungdu](https://github.com/dinhtungdu) via [#130](https://github.com/10up/simple-local-avatars/pull/130))! +* **Added:** Updated the button name from "Skip Crop" to "Default Crop" only on the edit profile page (props [@faisal-alvi](https://github.com/faisal-alvi), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#136](https://github.com/10up/simple-local-avatars/pull/136)). +* **Added:** If an image used for a local avatar has alt text assigned, ensure that alt text is used when rendering the image (props [@dkotter](https://github.com/dkotter), [@pixelloop](https://github.com/pixelloop), [@faisal-alvi](https://github.com/faisal-alvi) via [#127](https://github.com/10up/simple-local-avatars/pull/127)). +* **Added:** Support for bbPress by loading the JS at FE on the profile edit page (props [@foliovision](https://github.com/foliovision), [@faisal-alvi](https://github.com/faisal-alvi), [@iamdharmesh](https://github.com/iamdharmesh) via [#134](https://github.com/10up/simple-local-avatars/pull/134)). +* **Added:** Cypress E2E tests (props [@faisal-alvi](https://github.com/faisal-alvi), [@vikrampm1](https://github.com/vikrampm1), [@Sidsector9](https://github.com/Sidsector9) via [#115](https://github.com/10up/simple-local-avatars/pull/115)). +* **Fixed:** Broken avatar URLs for network-configured shared avatars with non-standard thumbnail sizes (props [@vladolaru](https://github.com/vladolaru), [@faisal-alvi](https://github.com/faisal-alvi) via [#125](https://github.com/10up/simple-local-avatars/pull/125)). +* **Fixed:** `HTTP_REFERER` is null and causing PHP warning (props [@alireza-salehi](https://github.com/alireza-salehi), [@faisal-alvi](https://github.com/faisal-alvi), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#129](https://github.com/10up/simple-local-avatars/pull/129)). + = 2.4.0 - 2022-05-10 = * **Added:** Ability to set a default avatar. (props [@mehulkaklotar](https://github.com/mehulkaklotar), [@jeffpaul](https://github.com/jeffpaul), [@dinhtungdu](https://github.com/dinhtungdu), [@faisal-alvi](https://github.com/faisal-alvi) via [#96](https://github.com/10up/simple-local-avatars/pull/96)). * **Fixed:** Correct plugin name in changelog. (props [@grappler](https://github.com/grappler), [@jeffpaul](https://github.com/jeffpaul) via [#117](https://github.com/10up/simple-local-avatars/pull/117)). 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 30bef3f1..f0212740 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.4.0 + * Version: 2.5.0 * Requires at least: 4.6 * Requires PHP: 5.6 * Author: Jake Goldman, 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.2.0' ); +define( 'SLA_VERSION', '2.5.0' ); define( 'SLA_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); if ( ! defined( 'SLA_IS_NETWORK' ) ) {