Hi JoomUnited Team !
It will be top feature to add role selected way for the "WP Media Folder Frontend" switch on General Settings.
If someone is looking for a method while waiting, it's possible, you could update the wp-media-folder.php file (*) with replacing the line number 567
Original :
Replace by :
Have a nice day
(*) but lost after each update.
It will be top feature to add role selected way for the "WP Media Folder Frontend" switch on General Settings.
If someone is looking for a method while waiting, it's possible, you could update the wp-media-folder.php file (*) with replacing the line number 567
Original :
567 : $frontend = get_option('wpmf_option_mediafolder');
Replace by :
if (!function_exists('wp_get_current_user')) {
include_once(ABSPATH . "wp-includes/pluggable.php");
}
$user = wp_get_current_user();
// Method 1 : create dedicated option
// $auth_roles = get_option('here_custom_option');
// Method 2 : because you need to rewrite this lines after each update perhaps dedicated option isn't needed
$auth_roles = ['administrator', 'other_role'];
if (count(array_intersect($auth_roles, $user->roles)) >= 1) {
//retrieve value only if current user role is in authorized roles list.
$frontend = get_option('wpmf_option_mediafolder');
}
Have a nice day
(*) but lost after each update.
- Page :
- 1
There are no replies made for this post yet.