mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 12:43:33 +09:00
- fix for profile form;
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
namespace um\core;
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'um\core\Validation' ) ) {
|
||||
|
||||
@@ -32,7 +33,7 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
|
||||
* Validation constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
add_filter( 'um_user_pre_updating_files_array', array( $this, 'validate_files' ), 10, 1 );
|
||||
add_filter( 'um_user_pre_updating_files_array', array( $this, 'validate_files' ) );
|
||||
add_filter( 'um_before_save_filter_submitted', array( $this, 'validate_fields_values' ), 10, 3 );
|
||||
}
|
||||
|
||||
@@ -65,7 +66,7 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
|
||||
}
|
||||
|
||||
//rating field validation
|
||||
if ( isset( $fields[ $key ]['type'] ) && $fields[ $key ]['type'] == 'rating' ) {
|
||||
if ( isset( $fields[ $key ]['type'] ) && 'rating' === $fields[ $key ]['type'] ) {
|
||||
if ( ! is_numeric( $value ) ) {
|
||||
unset( $changes[ $key ] );
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user