- fix banned fields and site health status

This commit is contained in:
ashubawork
2025-04-14 14:21:41 +03:00
parent 1d4d3fa850
commit 8ef597ad74
3 changed files with 139 additions and 1 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ if ( ! class_exists( 'um\core\Builtin' ) ) {
* @return int|string Empty or error string.
*/
public function blacklist_field_err( $key ) {
if ( in_array( strtolower( $key ), $this->blacklist_fields, true ) ) {
if ( in_array( strtolower( $key ), $this->blacklist_fields, true ) || in_array( strtolower( $key ), UM()->user()->banned_keys, true ) ) {
return __( 'Your meta key can not be used', 'ultimate-member' );
}
+3
View File
@@ -93,6 +93,9 @@ if ( ! class_exists( 'um\core\User' ) ) {
$this->banned_keys = array(
'metabox',
'user_id',
'role',
'user_pass',
'postbox',
'meta-box',
'dismissed_wp_pointers',