- fixed sanitizing types;

- fixed `in_group` attribute sanitizing;
This commit is contained in:
Nikita Sinelnikov
2021-07-21 20:26:33 +03:00
parent 0d49b5596b
commit 1e5e1f298d
7 changed files with 32 additions and 24 deletions
+4 -4
View File
@@ -405,7 +405,7 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
'sanitize' => 'text',
),
'_um_register_max_width' => array(
'sanitize' => 'absint',
'sanitize' => 'text',
),
'_um_register_icons' => array(
'sanitize' => 'key',
@@ -432,7 +432,7 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
'sanitize' => 'text',
),
'_um_login_max_width' => array(
'sanitize' => 'absint',
'sanitize' => 'text',
),
'_um_login_icons' => array(
'sanitize' => 'key',
@@ -465,10 +465,10 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
'sanitize' => 'text',
),
'_um_profile_max_width' => array(
'sanitize' => 'absint',
'sanitize' => 'text',
),
'_um_profile_area_max_width' => array(
'sanitize' => 'absint',
'sanitize' => 'text',
),
'_um_profile_icons' => array(
'sanitize' => 'key',
+1 -1
View File
@@ -131,7 +131,7 @@ if ( ! class_exists( 'um\admin\core\Admin_DragDrop' ) ) {
if ( 0 === strpos( $key, 'um_group_' ) ) {
$field_key = str_replace( 'um_group_', '', $key );
if ( isset( $fields[ $field_key ] ) ) {
$fields[ $field_key ]['in_group'] = absint( $value );
$fields[ $field_key ]['in_group'] = ! empty( $value ) ? absint( $value ) : '';
}
}
}
+4 -4
View File
@@ -757,10 +757,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'sanitize' => 'text',
),
'profile_max_width' => array(
'sanitize' => 'absint',
'sanitize' => 'text',
),
'profile_area_max_width' => array(
'sanitize' => 'absint',
'sanitize' => 'text',
),
'profile_icons' => array(
'sanitize' => 'key',
@@ -826,7 +826,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'sanitize' => 'text',
),
'register_max_width' => array(
'sanitize' => 'absint',
'sanitize' => 'text',
),
'register_align' => array(
'sanitize' => 'key',
@@ -853,7 +853,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'sanitize' => 'text',
),
'login_max_width' => array(
'sanitize' => 'absint',
'sanitize' => 'text',
),
'login_align' => array(
'sanitize' => 'key',