This commit is contained in:
Mykyta Synelnikov
2024-09-25 23:12:17 +03:00
parent 6d99694045
commit 3211fb2994
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -638,7 +638,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
),
array(
'id' => 'restricted_block_message',
'type' => 'textarea',
'type' => 'wp_editor',
'label' => __( 'Restricted Access Block Message', 'ultimate-member' ),
'description' => __( 'This is the message shown to users that do not have permission to view the block\'s content.', 'ultimate-member' ),
'conditional' => array( 'restricted_blocks', '=', 1 ),
@@ -650,7 +650,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'sanitize' => 'bool',
);
$settings_map['restricted_block_message'] = array(
'sanitize' => 'textarea',
'sanitize' => 'wp_kses',
);
}
+1 -1
View File
@@ -1264,7 +1264,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
return $block_content;
}
$default_message = UM()->options()->get( 'restricted_block_message' );
$default_message = wp_kses_post( UM()->options()->get( 'restricted_block_message' ) );
switch ( $block['attrs']['um_who_access'] ) {
case '1': {
if ( ! is_user_logged_in() ) {