From 82ae1dc6146ccca32568a49ab9967a97a1485af2 Mon Sep 17 00:00:00 2001 From: ashubawork Date: Wed, 12 Jul 2023 15:31:06 +0300 Subject: [PATCH] - notices, gdpr, settings, metabox, menu --- includes/admin/core/class-admin-gdpr.php | 9 +- includes/admin/core/class-admin-menu.php | 4 +- includes/admin/core/class-admin-metabox.php | 2 + includes/admin/core/class-admin-notices.php | 115 +++++++++++++------ includes/admin/core/class-admin-settings.php | 38 ++++-- 5 files changed, 119 insertions(+), 49 deletions(-) diff --git a/includes/admin/core/class-admin-gdpr.php b/includes/admin/core/class-admin-gdpr.php index 5a69dd2b..55e947bd 100644 --- a/includes/admin/core/class-admin-gdpr.php +++ b/includes/admin/core/class-admin-gdpr.php @@ -171,8 +171,8 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) { global $wpdb; $metadata = $wpdb->get_results( $wpdb->prepare( - "SELECT meta_key, meta_value - FROM {$wpdb->usermeta} + "SELECT meta_key, meta_value + FROM {$wpdb->usermeta} WHERE user_id = %d", $user_id ), ARRAY_A ); @@ -295,7 +295,8 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) { if ( $deleted ) { $items_removed = true; } else { - $messages[] = sprintf( __( 'Your %s was unable to be removed at this time.', 'ultimate-member' ), $metadata['name'] ); + // translators: %s: metadata name. + $messages[] = sprintf( __( 'Your %s was unable to be removed at this time.', 'ultimate-member' ), $metadata['name'] ); $items_retained = true; } } @@ -313,4 +314,4 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) { } -} \ No newline at end of file +} diff --git a/includes/admin/core/class-admin-menu.php b/includes/admin/core/class-admin-menu.php index 7ec8b88c..f4b43a3a 100644 --- a/includes/admin/core/class-admin-menu.php +++ b/includes/admin/core/class-admin-menu.php @@ -69,7 +69,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) { ob_start(); - printf( __( 'If you like Ultimate Member please consider leaving a %s review. It will help us to grow the plugin and make it more popular. Thank you.', 'ultimate-member' ), $link ) ?> + // translators: %s: Review link. + echo wp_kses( sprintf( __( 'If you like Ultimate Member please consider leaving a %s review. It will help us to grow the plugin and make it more popular. Thank you.', 'ultimate-member' ), $link ), JB()->get_allowed_html( 'admin_notice' ) ); + ?>