From 504818412cc7c837e736668607af3e7a087949a6 Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Mon, 10 May 2021 17:13:17 +0300 Subject: [PATCH] - added localized variable; --- includes/core/class-enqueue.php | 10 +++++++++- readme.txt | 5 +++++ ultimate-member.php | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/includes/core/class-enqueue.php b/includes/core/class-enqueue.php index 23ff3014..febea6ca 100644 --- a/includes/core/class-enqueue.php +++ b/includes/core/class-enqueue.php @@ -149,8 +149,16 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) { * } * ?> */ + + + $max_upload_size = wp_max_upload_size(); + if ( ! $max_upload_size ) { + $max_upload_size = 0; + } + $localize_data = apply_filters( 'um_enqueue_localize_data', array( - 'nonce' => wp_create_nonce( "um-frontend-nonce" ), + 'max_upload_size' => $max_upload_size, + 'nonce' => wp_create_nonce( "um-frontend-nonce" ), ) ); wp_localize_script( 'um_scripts', 'um_scripts', $localize_data ); diff --git a/readme.txt b/readme.txt index c1f030d8..db2605af 100644 --- a/readme.txt +++ b/readme.txt @@ -155,6 +155,11 @@ The plugin works with popular caching plugins by automatically excluding Ultimat * 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 += 2.1.21: June xx, 2021 = + +* Enhancements: + - Added: `um_scripts.max_upload_size` localized variable getting from `wp_max_upload_size()` + = 2.1.20: May 7, 2021 = * Enhancements: diff --git a/ultimate-member.php b/ultimate-member.php index cb4aa3f8..abc2a184 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -3,7 +3,7 @@ Plugin Name: Ultimate Member Plugin URI: http://ultimatemember.com/ Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress -Version: 2.1.20 +Version: 2.1.21-alpha Author: Ultimate Member Author URI: http://ultimatemember.com/ Text Domain: ultimate-member