- added hook comments;

- updated versions and changelog;
- updated gulpfile.js;
This commit is contained in:
Mykyta Synelnikov
2023-05-23 16:37:20 +03:00
parent 30482254ba
commit 74afe64226
6 changed files with 69 additions and 8 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ GNU Version 2 or Any Later Version
## Releases ## Releases
[Official Release Version: 2.6.0](https://github.com/ultimatemember/ultimatemember/releases/tag/2.6.0). [Official Release Version: 2.6.1](https://github.com/ultimatemember/ultimatemember/releases/tag/2.6.1).
## Changelog ## Changelog
+1 -1
View File
@@ -13,7 +13,7 @@ gulp.task( 'default', function ( done ) {
gulp.src(['assets/sass/*.sass']).pipe( sass().on( 'error', sass.logError ) ).pipe( gulp.dest( 'assets/css' ) ); gulp.src(['assets/sass/*.sass']).pipe( sass().on( 'error', sass.logError ) ).pipe( gulp.dest( 'assets/css' ) );
gulp.src(['assets/js/*.js', '!assets/js/*.min.js']) // path to your files gulp.src(['assets/js/*.js','!assets/js/um-fileupload.js', '!assets/js/*.min.js']) // path to your files
.pipe( uglify() ) .pipe( uglify() )
.pipe( rename({ suffix: '.min' }) ) .pipe( rename({ suffix: '.min' }) )
.pipe( gulp.dest( 'assets/js/' ) ); .pipe( gulp.dest( 'assets/js/' ) );
+26 -3
View File
@@ -3072,8 +3072,18 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
public function get_override_templates( $get_list = false ) { public function get_override_templates( $get_list = false ) {
$outdated_files = array(); $outdated_files = array();
$scan_files['um'] = $this->scan_template_files( um_path . '/templates/' ); $scan_files['um'] = $this->scan_template_files( um_path . '/templates/' );
$scan_files = apply_filters( 'um_override_templates_scan_files', $scan_files ); /**
$out_date = false; * Filters an array of the template files for scanning versions.
*
* @since 2.6.1
* @hook um_override_templates_scan_files
*
* @param {array} $scan_files Template files for scanning versions.
*
* @return {array} Template files for scanning versions.
*/
$scan_files = apply_filters( 'um_override_templates_scan_files', $scan_files );
$out_date = false;
set_transient( 'um_check_template_versions', time(), 12 * HOUR_IN_SECONDS ); set_transient( 'um_check_template_versions', time(), 12 * HOUR_IN_SECONDS );
@@ -3081,6 +3091,19 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
foreach ( $files as $file ) { foreach ( $files as $file ) {
if ( ! str_contains( $file, 'email/' ) ) { if ( ! str_contains( $file, 'email/' ) ) {
$located = array(); $located = array();
/**
* Filters an array of the template files for scanning versions based on $key.
*
* Note: $key - means um or extension key.
*
* @since 2.6.1
* @hook um_override_templates_get_template_path__{$key}
*
* @param {array} $located Template file paths for scanning versions.
* @param {string} $file Template file name.
*
* @return {array} Template file paths for scanning versions.
*/
$located = apply_filters( "um_override_templates_get_template_path__{$key}", $located, $file ); $located = apply_filters( "um_override_templates_get_template_path__{$key}", $located, $file );
if ( ! empty( $located ) ) { if ( ! empty( $located ) ) {
@@ -3188,7 +3211,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
// Pull only the first 8kiB of the file in. // Pull only the first 8kiB of the file in.
$file_data = fread( $fp, 8192 ); // @codingStandardsIgnoreLine. $file_data = fread( $fp, 8192 ); // @codingStandardsIgnoreLine.
// PHP will close file handle, but we are good citizens. // PHP will close a file handle, but we are good citizens.
fclose( $fp ); // @codingStandardsIgnoreLine. fclose( $fp ); // @codingStandardsIgnoreLine.
// Make sure we catch CR-only line endings. // Make sure we catch CR-only line endings.
+13 -1
View File
@@ -414,7 +414,19 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
if ( ! empty( UM()->options()->get( $template . '_on' ) ) ) { if ( ! empty( UM()->options()->get( $template . '_on' ) ) ) {
return; return;
} }
/**
* Filters for disabling email notifications programmatically.
*
* @since 2.6.1
* @hook um_disable_email_notification_sending
*
* @param {bool} $disabled Does an email is disabled programmatically. By default it is false.
* @param {string} $email Email address for sending.
* @param {string} $template Email template key.
* @param {array} $args Arguments for sending email.
*
* @return {bool} `true` if email is disabled programmatically.
*/
$hook_disabled = apply_filters( 'um_disable_email_notification_sending', false, $email, $template, $args ); $hook_disabled = apply_filters( 'um_disable_email_notification_sending', false, $email, $template, $args );
if ( false !== $hook_disabled ) { if ( false !== $hook_disabled ) {
return; return;
+27 -1
View File
@@ -7,7 +7,7 @@ Tags: community, member, membership, user-profile, user-registration
Requires PHP: 5.6 Requires PHP: 5.6
Requires at least: 5.5 Requires at least: 5.5
Tested up to: 6.2 Tested up to: 6.2
Stable tag: 2.6.0 Stable tag: 2.6.1
License: GNU Version 2 or Any Later Version License: GNU Version 2 or Any Later Version
License URI: http://www.gnu.org/licenses/gpl-3.0.txt License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -163,6 +163,32 @@ No, you do not need to use our plugins login or registration pages and can us
* To learn more about version 2.1 please see this [docs](https://docs.ultimatemember.com/article/1512-upgrade-2-1-0) * To learn more about version 2.1 please see this [docs](https://docs.ultimatemember.com/article/1512-upgrade-2-1-0)
* UM2.1+ is a significant update to the Member Directories' code base from 2.0.x. Please make sure you take a full-site backup with restore point before updating the plugin * UM2.1+ is a significant update to the Member Directories' code base from 2.0.x. Please make sure you take a full-site backup with restore point before updating the plugin
= 2.6.1: May 25, 2023 =
* Enhancements:
- Added: Override templates versioning utility for wp-admin
- Added: Style and class attributes to `info_text` field type in settings
- Added: Emails to install info
- Added: 'um_email_get_template_file_path' hook
- Added: Merging data passed with original field data when `edit_field()` function running
- Added: loading="lazy" for avatars and cover photos
- Tweak: Changed Discord account validation
- Tweak: Changes the structure for the Gutenberg blocks' scripts and way of registration
- Tweak: Removed `filter_input` function using
* Bugfixes:
- Fixed: Removed the hidden in UI taxonomies from the Access > Enable the "Content Restriction" settings for taxonomies setting
- Fixed: Dynamically declared variables inside the classes for PHP8 installations
- Fixed: Added wpnonce attribute for duplicate UM Form link
- Fixed: Sanitize restriction messages when Gutenberg block is restricted
- Fixed: Login form error class vulnerability
* All templates required update. Please add the version comments to your custom templates in themes
* Cached and optimized/minified assets(JS/CSS) must be flushed/re-generated after upgrade
= 2.6.0: March 29, 2023 = = 2.6.0: March 29, 2023 =
* Enhancements: * Enhancements:
+1 -1
View File
@@ -3,7 +3,7 @@
Plugin Name: Ultimate Member Plugin Name: Ultimate Member
Plugin URI: http://ultimatemember.com/ Plugin URI: http://ultimatemember.com/
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
Version: 2.6.1-alpha Version: 2.6.1
Author: Ultimate Member Author: Ultimate Member
Author URI: http://ultimatemember.com/ Author URI: http://ultimatemember.com/
Text Domain: ultimate-member Text Domain: ultimate-member