mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- small notices fixed;
This commit is contained in:
@@ -208,10 +208,8 @@ if ( ! class_exists( 'Profile' ) ) {
|
||||
|
||||
if ( ! empty( $array ) ) {
|
||||
foreach ( $array as $key ) {
|
||||
$data = '';
|
||||
|
||||
if ( $key ) {
|
||||
|
||||
$data = array();
|
||||
if ( isset( UM()->builtin()->all_user_fields[ $key ] ) ){
|
||||
$data = UM()->builtin()->all_user_fields[ $key ];
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
/***
|
||||
*** @store last login timestamp
|
||||
***/
|
||||
add_action('um_on_login_before_redirect', 'um_store_lastlogin_timestamp', 10);
|
||||
add_action('um_on_login_before_redirect', 'um_store_lastlogin_timestamp', 10, 1);
|
||||
function um_store_lastlogin_timestamp( $user_id ) {
|
||||
update_user_meta( $user_id, '_um_last_login', current_time( 'timestamp' ) );
|
||||
}
|
||||
|
||||
@@ -318,11 +318,12 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
/**
|
||||
* Force fields to use UTF-8 encoding
|
||||
* @param mixed $value
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
* @uses hook filter: um_profile_field_filter_hook__
|
||||
*/
|
||||
add_filter('um_profile_field_filter_hook__','um_force_utf8_fields',1,10);
|
||||
function um_force_utf8_fields( $value ){
|
||||
add_filter('um_profile_field_filter_hook__','um_force_utf8_fields', 10, 2 );
|
||||
function um_force_utf8_fields( $value, $data ) {
|
||||
|
||||
if( ! UM()->options()->get('um_force_utf8_strings') )
|
||||
return $value;
|
||||
|
||||
Reference in New Issue
Block a user