mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed js error from gutenberg blocks;
- fixed last login order;
This commit is contained in:
@@ -445,7 +445,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_register_script( 'um-blocks-shortcode-js', $this->js_url . 'um-admin-blocks-shortcode.js', array( 'wp-i18n', 'wp-blocks', 'wp-components' ), ultimatemember_version, true );
|
||||
wp_register_script( 'um-blocks-shortcode-js', $this->js_url . 'um-admin-blocks-shortcode.js', array( 'wp-i18n', 'wp-blocks', 'wp-components', 'rich-text' ), ultimatemember_version, true );
|
||||
wp_set_script_translations( 'um-blocks-shortcode-js', 'ultimate-member' );
|
||||
wp_enqueue_script( 'um-blocks-shortcode-js' );
|
||||
|
||||
|
||||
@@ -734,15 +734,15 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
|
||||
),
|
||||
|
||||
'user_url' => array(
|
||||
'title' => __('Website URL','ultimate-member'),
|
||||
'metakey' => 'user_url',
|
||||
'type' => 'url',
|
||||
'label' => __('Website URL','ultimate-member'),
|
||||
'required' => 1,
|
||||
'public' => 1,
|
||||
'editable' => 1,
|
||||
'validate' => 'url'
|
||||
),
|
||||
'title' => __('Website URL','ultimate-member'),
|
||||
'metakey' => 'user_url',
|
||||
'type' => 'url',
|
||||
'label' => __('Website URL','ultimate-member'),
|
||||
'required' => 1,
|
||||
'public' => 1,
|
||||
'editable' => 1,
|
||||
'validate' => 'url'
|
||||
),
|
||||
|
||||
'user_registered' => array(
|
||||
'title' => __('Registration Date','ultimate-member'),
|
||||
|
||||
@@ -451,13 +451,13 @@ add_filter( 'um_prepare_user_query_args', 'um_prepare_user_query_args', 10, 2 );
|
||||
function um_sortby_last_login( $query_args, $sortby ) {
|
||||
if ( $sortby == 'last_login' ) {
|
||||
$query_args['orderby'] = array( 'um_last_login' => 'DESC' );
|
||||
$query_args['meta_query']['um_last_login'] = array(
|
||||
$query_args['meta_query'][] = array(
|
||||
'relation' => 'OR',
|
||||
array(
|
||||
'key' => '_um_last_login',
|
||||
'compare' => 'EXISTS',
|
||||
),
|
||||
array(
|
||||
'um_last_login' => array(
|
||||
'key' => '_um_last_login',
|
||||
'compare' => 'NOT EXISTS',
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user