- 2.0.38 release;

This commit is contained in:
nikitasinelnikov
2019-01-10 14:29:39 +02:00
parent d72b0bf1d2
commit b1c290b10e
3 changed files with 428 additions and 422 deletions
+95 -89
View File
@@ -215,6 +215,100 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
}
}
$access_fields = array(
array(
'id' => 'accessible',
'type' => 'select',
'label' => __( 'Global Site Access','ultimate-member' ),
'tooltip' => __('Globally control the access of your site, you can have seperate restrict options per post/page by editing the desired item.','ultimate-member'),
'options' => array(
0 => 'Site accessible to Everyone',
2 => 'Site accessible to Logged In Users'
),
'size' => 'medium'
),
array(
'id' => 'access_redirect',
'type' => 'text',
'label' => __( 'Custom Redirect URL','ultimate-member' ),
'tooltip' => __('A logged out user will be redirected to this url If he is not permitted to access the site','ultimate-member'),
'conditional' => array( 'accessible', '=', 2 ),
),
array(
'id' => 'access_exclude_uris',
'type' => 'multi_text',
'label' => __( 'Exclude the following URLs','ultimate-member' ),
'tooltip' => __( 'Here you can exclude URLs beside the redirect URI to be accessible to everyone','ultimate-member' ),
'add_text' => __('Add New URL','ultimate-member'),
'conditional' => array( 'accessible', '=', 2 ),
'show_default_number' => 1,
),
array(
'id' => 'home_page_accessible',
'type' => 'checkbox',
'label' => __( 'Allow Homepage to be accessible','ultimate-member' ),
'conditional' => array( 'accessible', '=', 2 ),
),
array(
'id' => 'category_page_accessible',
'type' => 'checkbox',
'label' => __( 'Allow Category pages to be accessible','ultimate-member' ),
'conditional' => array( 'accessible', '=', 2 ),
),
array(
'id' => 'restricted_access_message',
'type' => 'wp_editor',
'label' => __( 'Restricted Access Message','ultimate-member' ),
'tooltip' => __( 'This is the message shown to users that do not have permission to view the content','ultimate-member' ),
)
);
global $wp_version;
if ( version_compare( $wp_version, '5.0', '>=' ) ) {
$access_fields = array_merge( $access_fields, array( array(
'id' => 'restricted_blocks',
'type' => 'checkbox',
'label' => __( 'Allow Gutenberg Blocks restriction options', 'ultimate-member' ),
),
array(
'id' => 'restricted_block_message',
'type' => 'textarea',
'label' => __( 'Restricted Block Message', 'ultimate-member' ),
'tooltip' => __( '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 ),
) ) );
}
$access_fields = array_merge( $access_fields, array( array(
'id' => 'restricted_access_post_metabox',
'type' => 'hidden',
'value' => '',
),
array(
'id' => 'restricted_access_taxonomy_metabox',
'type' => 'hidden',
'value' => '',
),
array(
'id' => 'restricted_access_post_metabox',
'type' => 'multi_checkbox',
'label' => __( 'Restricted Access to Posts','ultimate-member' ),
'tooltip' => __( 'Restriction content of the current Posts','ultimate-member' ),
'options' => $all_post_types,
'columns' => 3,
'value' => $restricted_access_post_metabox_value,
'default' => UM()->options()->get_default( 'restricted_access_post_metabox' ),
),
array(
'id' => 'restricted_access_taxonomy_metabox',
'type' => 'multi_checkbox',
'label' => __( 'Restricted Access to Taxonomies','ultimate-member' ),
'tooltip' => __( 'Restriction content of the current Taxonomies','ultimate-member' ),
'options' => $all_taxonomies,
'columns' => 3,
'value' => $restricted_access_taxonomy_metabox_value,
'default' => UM()->options()->get_default( 'restricted_access_taxonomy_metabox' ),
) ) );
/**
* UM hook
*
@@ -485,95 +579,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'sections' => array(
'' => array(
'title' => __( 'Restriction Content', 'ultimate-member' ),
'fields' => array(
array(
'id' => 'accessible',
'type' => 'select',
'label' => __( 'Global Site Access','ultimate-member' ),
'tooltip' => __('Globally control the access of your site, you can have seperate restrict options per post/page by editing the desired item.','ultimate-member'),
'options' => array(
0 => 'Site accessible to Everyone',
2 => 'Site accessible to Logged In Users'
),
'size' => 'medium'
),
array(
'id' => 'access_redirect',
'type' => 'text',
'label' => __( 'Custom Redirect URL','ultimate-member' ),
'tooltip' => __('A logged out user will be redirected to this url If he is not permitted to access the site','ultimate-member'),
'conditional' => array( 'accessible', '=', 2 ),
),
array(
'id' => 'access_exclude_uris',
'type' => 'multi_text',
'label' => __( 'Exclude the following URLs','ultimate-member' ),
'tooltip' => __( 'Here you can exclude URLs beside the redirect URI to be accessible to everyone','ultimate-member' ),
'add_text' => __('Add New URL','ultimate-member'),
'conditional' => array( 'accessible', '=', 2 ),
'show_default_number' => 1,
),
array(
'id' => 'home_page_accessible',
'type' => 'checkbox',
'label' => __( 'Allow Homepage to be accessible','ultimate-member' ),
'conditional' => array( 'accessible', '=', 2 ),
),
array(
'id' => 'category_page_accessible',
'type' => 'checkbox',
'label' => __( 'Allow Category pages to be accessible','ultimate-member' ),
'conditional' => array( 'accessible', '=', 2 ),
),
array(
'id' => 'restricted_access_message',
'type' => 'wp_editor',
'label' => __( 'Restricted Access Message','ultimate-member' ),
'tooltip' => __( 'This is the message shown to users that do not have permission to view the content','ultimate-member' ),
),
array(
'id' => 'restricted_blocks',
'type' => 'checkbox',
'label' => __( 'Allow Gutenberg Blocks restriction options', 'ultimate-member' ),
),
array(
'id' => 'restricted_block_message',
'type' => 'textarea',
'label' => __( 'Restricted Block Message', 'ultimate-member' ),
'tooltip' => __( '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 ),
),
array(
'id' => 'restricted_access_post_metabox',
'type' => 'hidden',
'value' => '',
),
array(
'id' => 'restricted_access_taxonomy_metabox',
'type' => 'hidden',
'value' => '',
),
array(
'id' => 'restricted_access_post_metabox',
'type' => 'multi_checkbox',
'label' => __( 'Restricted Access to Posts','ultimate-member' ),
'tooltip' => __( 'Restriction content of the current Posts','ultimate-member' ),
'options' => $all_post_types,
'columns' => 3,
'value' => $restricted_access_post_metabox_value,
'default' => UM()->options()->get_default( 'restricted_access_post_metabox' ),
),
array(
'id' => 'restricted_access_taxonomy_metabox',
'type' => 'multi_checkbox',
'label' => __( 'Restricted Access to Taxonomies','ultimate-member' ),
'tooltip' => __( 'Restriction content of the current Taxonomies','ultimate-member' ),
'options' => $all_taxonomies,
'columns' => 3,
'value' => $restricted_access_taxonomy_metabox_value,
'default' => UM()->options()->get_default( 'restricted_access_taxonomy_metabox' ),
),
)
'fields' => $access_fields
),
'other' => array(
'title' => __( 'Other', 'ultimate-member' ),
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -133,10 +133,10 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
= 2.0.38: January 9, 2019 =
= 2.0.38: January 10, 2019 =
* Enhancements:
- Added option to disable Gutenberg Blocks restriction
- Added option to enable Gutenberg Blocks restriction
= 2.0.37: January 8, 2019 =