From 0a86b3ec5208a02ed204ad5f6641b327f5d2981e Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Mon, 25 May 2020 17:51:48 +0300 Subject: [PATCH] - exclude these users for active UM custom metatable; - code formatting; --- includes/admin/core/class-admin-settings.php | 162 +++++++++--------- includes/core/class-member-directory-meta.php | 17 ++ 2 files changed, 98 insertions(+), 81 deletions(-) diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php index 6be0944c..5f366360 100644 --- a/includes/admin/core/class-admin-settings.php +++ b/includes/admin/core/class-admin-settings.php @@ -637,63 +637,63 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { 'title' => __( 'Account', 'ultimate-member' ), 'fields' => array( array( - 'id' => 'account_tab_password', - 'type' => 'checkbox', - 'label' => __( 'Password Account Tab','ultimate-member' ), - 'tooltip' => __('Enable/disable the Password account tab in account page','ultimate-member'), + 'id' => 'account_tab_password', + 'type' => 'checkbox', + 'label' => __( 'Password Account Tab', 'ultimate-member' ), + 'tooltip' => __( 'Enable/disable the Password account tab in account page', 'ultimate-member' ), ), array( - 'id' => 'account_tab_privacy', - 'type' => 'checkbox', - 'label' => __( 'Privacy Account Tab','ultimate-member' ), - 'tooltip' => __('Enable/disable the Privacy account tab in account page','ultimate-member'), + 'id' => 'account_tab_privacy', + 'type' => 'checkbox', + 'label' => __( 'Privacy Account Tab','ultimate-member' ), + 'tooltip' => __( 'Enable/disable the Privacy account tab in account page', 'ultimate-member' ), ), array( - 'id' => 'account_tab_notifications', - 'type' => 'checkbox', - 'label' => __( 'Notifications Account Tab','ultimate-member' ), - 'tooltip' => __('Enable/disable the Notifications account tab in account page','ultimate-member'), + 'id' => 'account_tab_notifications', + 'type' => 'checkbox', + 'label' => __( 'Notifications Account Tab','ultimate-member' ), + 'tooltip' => __( 'Enable/disable the Notifications account tab in account page', 'ultimate-member' ), ), array( - 'id' => 'account_tab_delete', - 'type' => 'checkbox', - 'label' => __( 'Delete Account Tab','ultimate-member' ), - 'tooltip' => __('Enable/disable the Delete account tab in account page','ultimate-member'), + 'id' => 'account_tab_delete', + 'type' => 'checkbox', + 'label' => __( 'Delete Account Tab','ultimate-member' ), + 'tooltip' => __( 'Enable/disable the Delete account tab in account page', 'ultimate-member' ), ), array( - 'id' => 'delete_account_text', - 'type' => 'textarea', // bug with wp 4.4? should be editor - 'label' => __( 'Account Deletion Custom Text','ultimate-member' ), - 'tooltip' => __('This is custom text that will be displayed to users before they delete their accounts from your site','ultimate-member'), - 'args' => array( + 'id' => 'delete_account_text', + 'type' => 'textarea', // bug with wp 4.4? should be editor + 'label' => __( 'Account Deletion Custom Text','ultimate-member' ), + 'tooltip' => __( 'This is custom text that will be displayed to users before they delete their accounts from your site', 'ultimate-member' ), + 'args' => array( 'textarea_rows' => 6 ), ), array( - 'id' => 'account_name', - 'type' => 'checkbox', - 'label' => __( 'Add a First & Last Name fields','ultimate-member' ), - 'tooltip' => __('Whether to enable these fields on the user account page by default or hide them.','ultimate-member'), + 'id' => 'account_name', + 'type' => 'checkbox', + 'label' => __( 'Add a First & Last Name fields','ultimate-member' ), + 'tooltip' => __( 'Whether to enable these fields on the user account page by default or hide them.', 'ultimate-member' ), ), array( - 'id' => 'account_name_disable', - 'type' => 'checkbox', - 'label' => __( 'Disable First & Last Name fields','ultimate-member' ), - 'tooltip' => __('Whether to allow users changing their first and last name in account page.','ultimate-member'), - 'conditional' => array( 'account_name', '=', '1' ), + 'id' => 'account_name_disable', + 'type' => 'checkbox', + 'label' => __( 'Disable First & Last Name fields','ultimate-member' ), + 'tooltip' => __( 'Whether to allow users changing their first and last name in account page.', 'ultimate-member' ), + 'conditional' => array( 'account_name', '=', '1' ), ), array( - 'id' => 'account_name_require', - 'type' => 'checkbox', - 'label' => __( 'Require First & Last Name','ultimate-member' ), - 'tooltip' => __('Require first and last name?','ultimate-member'), - 'conditional' => array( 'account_name', '=', '1' ), + 'id' => 'account_name_require', + 'type' => 'checkbox', + 'label' => __( 'Require First & Last Name', 'ultimate-member' ), + 'tooltip' => __( 'Require first and last name?', 'ultimate-member' ), + 'conditional' => array( 'account_name', '=', '1' ), ), array( - 'id' => 'account_email', - 'type' => 'checkbox', - 'label' => __( 'Allow users to change e-mail','ultimate-member' ), - 'tooltip' => __( 'Whether to allow users changing their email in account page.', 'ultimate-member' ), + 'id' => 'account_email', + 'type' => 'checkbox', + 'label' => __( 'Allow users to change e-mail','ultimate-member' ), + 'tooltip' => __( 'Whether to allow users changing their email in account page.', 'ultimate-member' ), ), array( 'id' => 'account_general_password', @@ -731,63 +731,63 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { 'title' => __( 'Uploads', 'ultimate-member' ), 'fields' => array( array( - 'id' => 'profile_photo_max_size', - 'type' => 'text', - 'size' => 'small', - 'label' => __( 'Profile Photo Maximum File Size (bytes)', 'ultimate-member' ), - 'tooltip' => __( 'Sets a maximum size for the uploaded photo', 'ultimate-member' ), + 'id' => 'profile_photo_max_size', + 'type' => 'text', + 'size' => 'small', + 'label' => __( 'Profile Photo Maximum File Size (bytes)', 'ultimate-member' ), + 'tooltip' => __( 'Sets a maximum size for the uploaded photo', 'ultimate-member' ), ), array( - 'id' => 'cover_photo_max_size', - 'type' => 'text', - 'size' => 'small', - 'label' => __( 'Cover Photo Maximum File Size (bytes)', 'ultimate-member' ), - 'tooltip' => __( 'Sets a maximum size for the uploaded cover', 'ultimate-member' ), + 'id' => 'cover_photo_max_size', + 'type' => 'text', + 'size' => 'small', + 'label' => __( 'Cover Photo Maximum File Size (bytes)', 'ultimate-member' ), + 'tooltip' => __( 'Sets a maximum size for the uploaded cover', 'ultimate-member' ), ), array( - 'id' => 'photo_thumb_sizes', - 'type' => 'multi_text', - 'size' => 'small', - 'label' => __( 'Profile Photo Thumbnail Sizes (px)','ultimate-member' ), - 'tooltip' => __( 'Here you can define which thumbnail sizes will be created for each profile photo upload.','ultimate-member' ), - 'validate' => 'numeric', - 'add_text' => __('Add New Size','ultimate-member'), - 'show_default_number' => 1, + 'id' => 'photo_thumb_sizes', + 'type' => 'multi_text', + 'size' => 'small', + 'label' => __( 'Profile Photo Thumbnail Sizes (px)', 'ultimate-member' ), + 'tooltip' => __( 'Here you can define which thumbnail sizes will be created for each profile photo upload.', 'ultimate-member' ), + 'validate' => 'numeric', + 'add_text' => __( 'Add New Size', 'ultimate-member' ), + 'show_default_number' => 1, ), array( - 'id' => 'cover_thumb_sizes', - 'type' => 'multi_text', - 'size' => 'small', - 'label' => __( 'Cover Photo Thumbnail Sizes (px)','ultimate-member' ), - 'tooltip' => __( 'Here you can define which thumbnail sizes will be created for each cover photo upload.','ultimate-member' ), - 'validate' => 'numeric', - 'add_text' => __('Add New Size','ultimate-member'), - 'show_default_number' => 1, + 'id' => 'cover_thumb_sizes', + 'type' => 'multi_text', + 'size' => 'small', + 'label' => __( 'Cover Photo Thumbnail Sizes (px)', 'ultimate-member' ), + 'tooltip' => __( 'Here you can define which thumbnail sizes will be created for each cover photo upload.', 'ultimate-member' ), + 'validate' => 'numeric', + 'add_text' => __( 'Add New Size', 'ultimate-member' ), + 'show_default_number' => 1, ), array( - 'id' => 'image_compression', - 'type' => 'text', - 'size' => 'small', - 'label' => __( 'Image Quality','ultimate-member'), - 'tooltip' => __( 'Quality is used to determine quality of image uploads, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default range is 60.', 'ultimate-member' ), + 'id' => 'image_compression', + 'type' => 'text', + 'size' => 'small', + 'label' => __( 'Image Quality', 'ultimate-member' ), + 'tooltip' => __( 'Quality is used to determine quality of image uploads, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default range is 60.', 'ultimate-member' ), ), array( - 'id' => 'image_max_width', - 'type' => 'text', - 'size' => 'small', - 'label' => __( 'Image Upload Maximum Width (px)', 'ultimate-member' ), - 'tooltip' => __( 'Any image upload above this width will be resized to this limit automatically.', 'ultimate-member' ), + 'id' => 'image_max_width', + 'type' => 'text', + 'size' => 'small', + 'label' => __( 'Image Upload Maximum Width (px)', 'ultimate-member' ), + 'tooltip' => __( 'Any image upload above this width will be resized to this limit automatically.', 'ultimate-member' ), ), array( - 'id' => 'cover_min_width', - 'type' => 'text', - 'size' => 'small', - 'label' => __( 'Cover Photo Minimum Width (px)', 'ultimate-member' ), - 'tooltip' => __( 'This will be the minimum width for cover photo uploads', 'ultimate-member' ), + 'id' => 'cover_min_width', + 'type' => 'text', + 'size' => 'small', + 'label' => __( 'Cover Photo Minimum Width (px)', 'ultimate-member' ), + 'tooltip' => __( 'This will be the minimum width for cover photo uploads', 'ultimate-member' ), ), ) ) @@ -2966,4 +2966,4 @@ Use Only Cookies: where_clauses[] = "u.ID NOT IN ( '" . implode( "','", $users_array ) . "' )"; + } + } + } + $profile_photo_where = ''; if ( $directory_data['has_profile_photo'] == 1 ) {