Version Description
- User role support added
=
Download this release
Release Info
Developer | rextheme |
Plugin | WP VR – 360 Panorama and virtual tour creator for WordPress |
Version | 4.0.0 |
Comparing to | |
See all releases |
Code changes from version 3.9.0 to 4.0.0
- README.txt +6 -2
- admin/class-wpvr-admin.php +13 -2
- admin/class-wpvr-ajax.php +16 -0
- admin/css/wpvr-admin.css +19 -0
- admin/partials/wpvr_documentation.php +80 -6
- includes/class-wpvr.php +1 -0
- wpvr.php +93 -1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-fo
|
|
4 |
Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag:
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -112,6 +112,7 @@ For more control over creating a virtual tour, learn about the [Premium version]
|
|
112 |
* Google street view embed
|
113 |
* Company logo
|
114 |
* Partial Panorama
|
|
|
115 |
* Personalized support (e-mail or forum)
|
116 |
|
117 |
[Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
|
@@ -320,8 +321,11 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
|
|
320 |
= 3.8.0 =
|
321 |
* Load box design changed
|
322 |
|
323 |
-
= 3.
|
324 |
* Gallery toggle fix
|
325 |
|
|
|
|
|
|
|
326 |
== Upgrade Notice ==
|
327 |
Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.
|
4 |
Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 4.0.0
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
112 |
* Google street view embed
|
113 |
* Company logo
|
114 |
* Partial Panorama
|
115 |
+
* WP User Role based Add/Edit feature
|
116 |
* Personalized support (e-mail or forum)
|
117 |
|
118 |
[Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
|
321 |
= 3.8.0 =
|
322 |
* Load box design changed
|
323 |
|
324 |
+
= 3.9.0 =
|
325 |
* Gallery toggle fix
|
326 |
|
327 |
+
= 4.0.0 =
|
328 |
+
* User role support added
|
329 |
+
|
330 |
== Upgrade Notice ==
|
331 |
Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.
|
admin/class-wpvr-admin.php
CHANGED
@@ -193,16 +193,27 @@ class Wpvr_Admin {
|
|
193 |
'not_found_in_trash'=> __( 'No Wpvr Tour found in Trash', $this->plugin_name ),
|
194 |
'parent_item_colon' => '',
|
195 |
'all_items' => __( 'All Tours', $this->plugin_name ),
|
196 |
-
'menu_name' => __( '
|
197 |
);
|
198 |
|
199 |
$args = array(
|
200 |
'labels' => $labels,
|
201 |
'public' => false,
|
202 |
'show_ui' => true,
|
203 |
-
'show_in_menu'
|
204 |
'menu_position' => 100,
|
205 |
'supports' => array( 'title' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
);
|
207 |
|
208 |
/**
|
193 |
'not_found_in_trash'=> __( 'No Wpvr Tour found in Trash', $this->plugin_name ),
|
194 |
'parent_item_colon' => '',
|
195 |
'all_items' => __( 'All Tours', $this->plugin_name ),
|
196 |
+
'menu_name' => __( 'WP VR', $this->plugin_name ),
|
197 |
);
|
198 |
|
199 |
$args = array(
|
200 |
'labels' => $labels,
|
201 |
'public' => false,
|
202 |
'show_ui' => true,
|
203 |
+
'show_in_menu' => false,
|
204 |
'menu_position' => 100,
|
205 |
'supports' => array( 'title' ),
|
206 |
+
'menu_icon' => plugins_url(). '/wpvr/images/icon.png',
|
207 |
+
'capabilities' => array(
|
208 |
+
'edit_post' => 'edit_wpvr_tour',
|
209 |
+
'edit_posts' => 'edit_wpvr_tours',
|
210 |
+
'edit_others_posts' => 'edit_other_wpvr_tours',
|
211 |
+
'publish_posts' => 'publish_wpvr_tours',
|
212 |
+
'read_post' => 'read_wpvr_tour',
|
213 |
+
'read_private_posts' => 'read_private_wpvr_tours',
|
214 |
+
'delete_post' => 'delete_wpvr_tour'
|
215 |
+
),
|
216 |
+
'map_meta_cap' => true,
|
217 |
);
|
218 |
|
219 |
/**
|
admin/class-wpvr-ajax.php
CHANGED
@@ -1133,4 +1133,20 @@ class Wpvr_Ajax {
|
|
1133 |
$response = array(__( "panoid" )=>$panoid,__( "panodata" )=>$html,__( "streetview" )=>$streetviewid);
|
1134 |
wp_send_json_success( $response );
|
1135 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1136 |
}
|
1133 |
$response = array(__( "panoid" )=>$panoid,__( "panodata" )=>$html,__( "streetview" )=>$streetviewid);
|
1134 |
wp_send_json_success( $response );
|
1135 |
}
|
1136 |
+
|
1137 |
+
/**
|
1138 |
+
* Role management
|
1139 |
+
*/
|
1140 |
+
function wpvr_role_management() {
|
1141 |
+
$editor = sanitize_text_field($_POST['editor']);
|
1142 |
+
$author = sanitize_text_field($_POST['author']);
|
1143 |
+
update_option('wpvr_editor_active', $editor);
|
1144 |
+
update_option('wpvr_author_active', $author);
|
1145 |
+
$response = array(
|
1146 |
+
'status' => 'success',
|
1147 |
+
'message' => 'Successfully saved',
|
1148 |
+
);
|
1149 |
+
wp_send_json($response);
|
1150 |
+
}
|
1151 |
+
|
1152 |
}
|
admin/css/wpvr-admin.css
CHANGED
@@ -4,7 +4,25 @@
|
|
4 |
*/
|
5 |
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
/* Absolute Center Spinner */
|
9 |
.wpvr-loading {
|
10 |
position: fixed;
|
@@ -1945,4 +1963,5 @@ button.delete-hotspot{
|
|
1945 |
right: 10px;
|
1946 |
}
|
1947 |
|
|
|
1948 |
}
|
4 |
*/
|
5 |
|
6 |
|
7 |
+
.wpvr_tabs_row {
|
8 |
+
width: 20% !important;
|
9 |
+
}
|
10 |
+
|
11 |
+
/* wpvr_role-container */
|
12 |
+
|
13 |
+
.wpvr_role-container .switch {
|
14 |
+
display: flex;
|
15 |
+
justify-content: space-between;
|
16 |
+
align-items: center;
|
17 |
+
}
|
18 |
|
19 |
+
.wpvr_role-container ul {
|
20 |
+
padding: 10px;
|
21 |
+
}
|
22 |
+
.wpvr_role-container .switch h6 {
|
23 |
+
width: calc(100% - 130px);
|
24 |
+
padding-right: 20px;
|
25 |
+
}
|
26 |
/* Absolute Center Spinner */
|
27 |
.wpvr-loading {
|
28 |
position: fixed;
|
1963 |
right: 10px;
|
1964 |
}
|
1965 |
|
1966 |
+
|
1967 |
}
|
admin/partials/wpvr_documentation.php
CHANGED
@@ -20,13 +20,14 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
20 |
<div class="wrapper">
|
21 |
<div class="col s12 no-pd">
|
22 |
<ul class="tabs tabs-icon rex-tabs">
|
23 |
-
<li class="tab col s3"><a href="#tab1"><i class="material-icons">settings</i><?php _e('General','wpvr'); ?></a></li>
|
24 |
-
<li class="tab col s3"><a href="#tab2"><i class="material-icons">perm_media</i><?php _e('Video Tutorials','wpvr'); ?></a></li>
|
25 |
-
<li class="tab col s3"><a href="#tab3"><i class="material-icons">thumb_up_alt</i><?php _e('Go Premium','wpvr'); ?></a></li>
|
26 |
<?php
|
27 |
if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
|
28 |
?>
|
29 |
-
<li class="tab col s3"><a href="#tab4"><i class="material-icons">add</i><?php _e('Import','wpvr'); ?></a></li>
|
|
|
30 |
<?php
|
31 |
}
|
32 |
?>
|
@@ -192,6 +193,72 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
192 |
</div>
|
193 |
</div>
|
194 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
<?php
|
196 |
}
|
197 |
?>
|
@@ -200,8 +267,15 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
200 |
|
201 |
<div class="right">
|
202 |
<div class="rex-banner">
|
203 |
-
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
<a href="https://wordpress.org/plugins/social-booster/" target="_blank"><img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/Social_Booster_Banner.png'?>" alt="rex-banner"></a>
|
206 |
</div>
|
207 |
</div>
|
20 |
<div class="wrapper">
|
21 |
<div class="col s12 no-pd">
|
22 |
<ul class="tabs tabs-icon rex-tabs">
|
23 |
+
<li class="tab col s3 wpvr_tabs_row"><a href="#tab1"><i class="material-icons">settings</i><?php _e('General','wpvr'); ?></a></li>
|
24 |
+
<li class="tab col s3 wpvr_tabs_row"><a href="#tab2"><i class="material-icons">perm_media</i><?php _e('Video Tutorials','wpvr'); ?></a></li>
|
25 |
+
<li class="tab col s3 wpvr_tabs_row"><a href="#tab3"><i class="material-icons">thumb_up_alt</i><?php _e('Go Premium','wpvr'); ?></a></li>
|
26 |
<?php
|
27 |
if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
|
28 |
?>
|
29 |
+
<li class="tab col s3 wpvr_tabs_row"><a href="#tab4"><i class="material-icons">add</i><?php _e('Import','wpvr'); ?></a></li>
|
30 |
+
<li class="tab col s3 wpvr_tabs_row"><a href="#tab5"><i class="material-icons">people_outline</i><?php _e('Role','wpvr'); ?></a></li>
|
31 |
<?php
|
32 |
}
|
33 |
?>
|
193 |
</div>
|
194 |
</div>
|
195 |
</div>
|
196 |
+
<div id="tab5" class="block-wrapper">
|
197 |
+
<div class="rex-upgrade">
|
198 |
+
<h4><?php _e('Enable user roles to apply their behavior','wpvr'); ?></h4>
|
199 |
+
<div class="parent" style="width:100%;">
|
200 |
+
<div class="wpvr_role-container">
|
201 |
+
<ul>
|
202 |
+
<?php
|
203 |
+
$editor_active = get_option('wpvr_editor_active');
|
204 |
+
$author_active = get_option('wpvr_author_active');
|
205 |
+
?>
|
206 |
+
<li>
|
207 |
+
<div class="switch">
|
208 |
+
<h6>Select Editors to manage WP VR tours. They can edit, delete and update their own and other user's tours:</h6>
|
209 |
+
<label>
|
210 |
+
Off
|
211 |
+
<?php
|
212 |
+
if ($editor_active == "true") {
|
213 |
+
?>
|
214 |
+
<input id="wpvr_editor_active" type="checkbox" checked>
|
215 |
+
<?php
|
216 |
+
}
|
217 |
+
else {
|
218 |
+
?>
|
219 |
+
<input id="wpvr_editor_active" type="checkbox">
|
220 |
+
<?php
|
221 |
+
}
|
222 |
+
?>
|
223 |
+
|
224 |
+
<span class="lever"></span>
|
225 |
+
On
|
226 |
+
</label>
|
227 |
+
</div>
|
228 |
+
</li>
|
229 |
+
<li>
|
230 |
+
<div class="switch">
|
231 |
+
<h6>Select Authors to manage WP VR tours. They can edit, delete and update their own tours only:</h6>
|
232 |
+
<label>
|
233 |
+
Off
|
234 |
+
<?php
|
235 |
+
if ($author_active == "true") {
|
236 |
+
?>
|
237 |
+
<input id="wpvr_author_active" type="checkbox" checked>
|
238 |
+
<?php
|
239 |
+
}
|
240 |
+
else {
|
241 |
+
?>
|
242 |
+
<input id="wpvr_author_active" type="checkbox">
|
243 |
+
<?php
|
244 |
+
}
|
245 |
+
?>
|
246 |
+
<span class="lever"></span>
|
247 |
+
On
|
248 |
+
</label>
|
249 |
+
</div>
|
250 |
+
</li>
|
251 |
+
</ul>
|
252 |
+
<div id="wpvr_role_progress" class="progress" style="display:none;">
|
253 |
+
<div class="indeterminate"></div>
|
254 |
+
</div>
|
255 |
+
<button class="btn waves-effect waves-light" type="submit" id="wpvr_role_submit" >Save
|
256 |
+
<i class="material-icons right">send</i>
|
257 |
+
</button>
|
258 |
+
</div>
|
259 |
+
</div>
|
260 |
+
</div>
|
261 |
+
</div>
|
262 |
<?php
|
263 |
}
|
264 |
?>
|
267 |
|
268 |
<div class="right">
|
269 |
<div class="rex-banner">
|
270 |
+
|
271 |
+
<?php
|
272 |
+
if (!apply_filters('is_wpvr_premium', false)) {
|
273 |
+
?>
|
274 |
+
<img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/icon-128x128.png'?>" class="banner-logo" alt="logo">
|
275 |
+
<a href="https://rextheme.com/wpvr/" class="update-btn" target="_blank"><?php _e('Upgrade to Pro','wpvr');?></a>
|
276 |
+
<?php
|
277 |
+
}
|
278 |
+
?>
|
279 |
<a href="https://wordpress.org/plugins/social-booster/" target="_blank"><img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/Social_Booster_Banner.png'?>" alt="rex-banner"></a>
|
280 |
</div>
|
281 |
</div>
|
includes/class-wpvr.php
CHANGED
@@ -220,6 +220,7 @@ class Wpvr {
|
|
220 |
$this->loader->add_action( 'wp_ajax_wpvrvideo_preview', $plugin_admin_ajax, 'wpvrvideo_preview' );
|
221 |
$this->loader->add_action( 'wp_ajax_wpvrstreetview_preview', $plugin_admin_ajax, 'wpvrstreetview_preview' );
|
222 |
$this->loader->add_action( 'wp_ajax_wpvr_file_import', $plugin_admin_ajax, 'wpvr_file_import' );
|
|
|
223 |
|
224 |
}
|
225 |
|
220 |
$this->loader->add_action( 'wp_ajax_wpvrvideo_preview', $plugin_admin_ajax, 'wpvrvideo_preview' );
|
221 |
$this->loader->add_action( 'wp_ajax_wpvrstreetview_preview', $plugin_admin_ajax, 'wpvrstreetview_preview' );
|
222 |
$this->loader->add_action( 'wp_ajax_wpvr_file_import', $plugin_admin_ajax, 'wpvr_file_import' );
|
223 |
+
$this->loader->add_action( 'wp_ajax_wpvr_role_management', $plugin_admin_ajax, 'wpvr_role_management' );
|
224 |
|
225 |
}
|
226 |
|
wpvr.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: WP VR
|
17 |
* Plugin URI: https://rextheme.com/wpvr/
|
18 |
* Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
|
19 |
-
* Version:
|
20 |
* Author: Rextheme
|
21 |
* Author URI: http://rextheme.com/
|
22 |
* License: GPL-2.0+
|
@@ -1015,3 +1015,95 @@ function wpvr_delete_temp_file() {
|
|
1015 |
unlink($file);
|
1016 |
}
|
1017 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
* Plugin Name: WP VR
|
17 |
* Plugin URI: https://rextheme.com/wpvr/
|
18 |
* Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
|
19 |
+
* Version: 4.0.0
|
20 |
* Author: Rextheme
|
21 |
* Author URI: http://rextheme.com/
|
22 |
* License: GPL-2.0+
|
1015 |
unlink($file);
|
1016 |
}
|
1017 |
}
|
1018 |
+
|
1019 |
+
function wpvr_add_role_cap() {
|
1020 |
+
|
1021 |
+
$editor_active = get_option('wpvr_editor_active');
|
1022 |
+
$author_active = get_option('wpvr_author_active');
|
1023 |
+
|
1024 |
+
$admin = get_role( 'administrator' );
|
1025 |
+
$admin->add_cap( 'publish_wpvr_tour' );
|
1026 |
+
$admin->add_cap( 'edit_wpvr_tours' );
|
1027 |
+
$admin->add_cap( 'read_wpvr_tour' );
|
1028 |
+
$admin->add_cap( 'edit_wpvr_tour' );
|
1029 |
+
$admin->add_cap( 'edit_wpvr_tours' );
|
1030 |
+
$admin->add_cap( 'publish_wpvr_tours' );
|
1031 |
+
$admin->add_cap( 'publish_wpvr_tour' );
|
1032 |
+
$admin->add_cap( 'delete_wpvr_tour' );
|
1033 |
+
$admin->add_cap( 'edit_other_wpvr_tours' );
|
1034 |
+
$admin->add_cap( 'delete_other_wpvr_tours' );
|
1035 |
+
|
1036 |
+
if ($editor_active == "true") {
|
1037 |
+
$editor = get_role( 'editor' );
|
1038 |
+
$editor->add_cap( 'publish_wpvr_tour' );
|
1039 |
+
$editor->add_cap( 'edit_wpvr_tours' );
|
1040 |
+
$editor->add_cap( 'read_wpvr_tour' );
|
1041 |
+
$editor->add_cap( 'edit_wpvr_tour' );
|
1042 |
+
$editor->add_cap( 'edit_wpvr_tours' );
|
1043 |
+
$editor->add_cap( 'publish_wpvr_tours' );
|
1044 |
+
$editor->add_cap( 'publish_wpvr_tour' );
|
1045 |
+
$editor->add_cap( 'delete_wpvr_tour' );
|
1046 |
+
$editor->add_cap( 'edit_other_wpvr_tours' );
|
1047 |
+
$editor->add_cap( 'delete_other_wpvr_tours' );
|
1048 |
+
}
|
1049 |
+
else {
|
1050 |
+
$editor = get_role( 'editor' );
|
1051 |
+
$editor->remove_cap( 'publish_wpvr_tour' );
|
1052 |
+
$editor->remove_cap( 'edit_wpvr_tours' );
|
1053 |
+
$editor->remove_cap( 'read_wpvr_tour' );
|
1054 |
+
$editor->remove_cap( 'edit_wpvr_tour' );
|
1055 |
+
$editor->remove_cap( 'edit_wpvr_tours' );
|
1056 |
+
$editor->remove_cap( 'publish_wpvr_tours' );
|
1057 |
+
$editor->remove_cap( 'publish_wpvr_tour' );
|
1058 |
+
$editor->remove_cap( 'delete_wpvr_tour' );
|
1059 |
+
$editor->remove_cap( 'edit_other_wpvr_tours' );
|
1060 |
+
$editor->remove_cap( 'delete_other_wpvr_tours' );
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
if ($author_active == "true") {
|
1064 |
+
$author = get_role( 'author' );
|
1065 |
+
$author->add_cap( 'read_wpvr_tour' );
|
1066 |
+
$author->add_cap( 'edit_wpvr_tour' );
|
1067 |
+
$author->add_cap( 'edit_wpvr_tours' );
|
1068 |
+
$author->add_cap( 'publish_wpvr_tours' );
|
1069 |
+
$author->add_cap( 'publish_wpvr_tour' );
|
1070 |
+
$author->add_cap( 'delete_wpvr_tour' );
|
1071 |
+
}
|
1072 |
+
else {
|
1073 |
+
$author = get_role( 'author' );
|
1074 |
+
$author->remove_cap( 'read_wpvr_tour' );
|
1075 |
+
$author->remove_cap( 'edit_wpvr_tour' );
|
1076 |
+
$author->remove_cap( 'edit_wpvr_tours' );
|
1077 |
+
$author->remove_cap( 'publish_wpvr_tours' );
|
1078 |
+
$author->remove_cap( 'publish_wpvr_tour' );
|
1079 |
+
$author->remove_cap( 'delete_wpvr_tour' );
|
1080 |
+
}
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
add_action('admin_init','wpvr_add_role_cap',999);
|
1084 |
+
|
1085 |
+
function wpvr_role_management_from_post_type( $args, $post_type ){
|
1086 |
+
|
1087 |
+
if ( 'wpvr_item' !== $post_type ) {
|
1088 |
+
return $args;
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
$editor_active = get_option('wpvr_editor_active');
|
1092 |
+
$author_active = get_option('wpvr_author_active');
|
1093 |
+
$user = wp_get_current_user();
|
1094 |
+
|
1095 |
+
if ($editor_active == "true") {
|
1096 |
+
if ( in_array( 'editor', (array) $user->roles ) ) {
|
1097 |
+
$args['show_in_menu'] = true;
|
1098 |
+
}
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
if ($author_active == "true") {
|
1102 |
+
if ( in_array( 'author', (array) $user->roles ) ) {
|
1103 |
+
$args['show_in_menu'] = true;
|
1104 |
+
}
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
return $args;
|
1108 |
+
}
|
1109 |
+
add_filter( 'register_post_type_args', 'wpvr_role_management_from_post_type' , 10, 2 );
|