- fix restrictions for all blocks

This commit is contained in:
ashubawork
2025-06-19 15:30:30 +03:00
parent 8f34bbb4fa
commit 45c8593157
2 changed files with 45 additions and 5 deletions
+11 -5
View File
@@ -37,27 +37,33 @@ if ( ! class_exists( 'um\core\Blocks' ) ) {
if ( empty( $settings['attributes']['um_is_restrict'] ) ) {
$settings['attributes']['um_is_restrict'] = array(
'type' => 'boolean',
'type' => 'boolean',
'default' => false,
);
}
if ( empty( $settings['attributes']['um_who_access'] ) ) {
$settings['attributes']['um_who_access'] = array(
'type' => 'string',
'type' => 'string',
'default' => 0,
);
}
if ( empty( $settings['attributes']['um_roles_access'] ) ) {
$settings['attributes']['um_roles_access'] = array(
'type' => 'array',
'type' => 'array',
'default' => array(),
'items' => array( 'type' => 'string' ),
);
}
if ( empty( $settings['attributes']['um_message_type'] ) ) {
$settings['attributes']['um_message_type'] = array(
'type' => 'string',
'type' => 'string',
'default' => 0,
);
}
if ( empty( $settings['attributes']['um_message_content'] ) ) {
$settings['attributes']['um_message_content'] = array(
'type' => 'string',
'type' => 'string',
'default' => '',
);
}