mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
* fixed #1516;
This commit is contained in:
@@ -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',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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() ) {
|
||||
|
||||
Reference in New Issue
Block a user