mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fix banned fields and site health status
This commit is contained in:
@@ -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' );
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user