Use WordPress media gallery for admin users
Quote from Adnan on June 12, 2019, 3:26 pmHi @asgaros it,s posible to use WordPress media gallery only for Admin user?
If Admin = can use WordPress media gallery inside topics.
AND
if Admin = WYSIWYG HTML Editor else = Minimal Text Editor
Thanks, every thing working fine on my site 🙂
Hi @asgaros it,s posible to use WordPress media gallery only for Admin user?
If Admin = can use WordPress media gallery inside topics.
AND
if Admin = WYSIWYG HTML Editor else = Minimal Text Editor
Thanks, every thing working fine on my site 🙂
Quote from Asgaros on June 13, 2019, 4:37 pmHello @adnan
You can try to add the following code to your themes functions.php file:
function change_editor_settings($settings) { if (is_super_admin()) { $settings['media_buttons'] = true; } else { $settings['quicktags'] = true; } return $settings; } add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');
Hello @adnan
You can try to add the following code to your themes functions.php file:
function change_editor_settings($settings) { if (is_super_admin()) { $settings['media_buttons'] = true; } else { $settings['quicktags'] = true; } return $settings; } add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');
Quote from Adnan on June 13, 2019, 5:24 pmQuote from Asgaros on June 13, 2019, 4:37 pmHello @adnan
You can try to add the following code to your themes functions.php file:
function change_editor_settings($settings) { if (is_super_admin()) { $settings['media_buttons'] = true; } else { $settings['quicktags'] = true; } return $settings; } add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');
- function change_editor_settings($settings) {
- if (is_super_admin()) {
- $settings[‘media_buttons’] = true;
- } else {
- $settings[‘quicktags’] = true;
- }
- return $settings;
- }
- add_filter(‘asgarosforum_filter_editor_settings’, ‘change_editor_settings’);
function change_editor_settings($settings) { if (is_super_admin()) { $settings['media_buttons'] = true; } else { $settings['quicktags'] = true; } return $settings; } add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');
Just try the code but noting happen
- if (is_super_admin()) { i change to if(is_admin() { because i am admin not super_admin (try both but nothing happen).
Quote from Asgaros on June 13, 2019, 4:37 pmHello @adnan
You can try to add the following code to your themes functions.php file:
function change_editor_settings($settings) { if (is_super_admin()) { $settings['media_buttons'] = true; } else { $settings['quicktags'] = true; } return $settings; } add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');
- function change_editor_settings($settings) {
- if (is_super_admin()) {
- $settings[‘media_buttons’] = true;
- } else {
- $settings[‘quicktags’] = true;
- }
- return $settings;
- }
- add_filter(‘asgarosforum_filter_editor_settings’, ‘change_editor_settings’);
function change_editor_settings($settings) { if (is_super_admin()) { $settings['media_buttons'] = true; } else { $settings['quicktags'] = true; } return $settings; } add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');
Just try the code but noting happen
- if (is_super_admin()) { i change to if(is_admin() { because i am admin not super_admin (try both but nothing happen).
Quote from Asgaros on June 14, 2019, 3:47 pmHello @adnan
You have to use the is_super_admin() function, because the is_admin() function cannot be used for this. If you are a normal WordPress administrator, it should work fine.
Hello @adnan
You have to use the is_super_admin() function, because the is_admin() function cannot be used for this. If you are a normal WordPress administrator, it should work fine.
Quote from Adnan on June 14, 2019, 4:45 pmQuote from Asgaros on June 14, 2019, 3:47 pmHello @adnan
You have to use the is_super_admin() function, because the is_admin() function cannot be used for this. If you are a normal WordPress administrator, it should work fine.
With is_super_admin() topic page not load for Admin users.
Quote from Asgaros on June 14, 2019, 3:47 pmHello @adnan
You have to use the is_super_admin() function, because the is_admin() function cannot be used for this. If you are a normal WordPress administrator, it should work fine.
With is_super_admin() topic page not load for Admin users.
Uploaded files:Quote from Asgaros on June 20, 2019, 11:28 amHello @adnan
I tested the code again and its working fine so far. Can you check your browser-console in Google Chrome by pressing CTRL + SHIFT + J? Do you see any error in the Console tab there?
Hello @adnan
I tested the code again and its working fine so far. Can you check your browser-console in Google Chrome by pressing CTRL + SHIFT + J? Do you see any error in the Console tab there?
Quote from Adnan on June 20, 2019, 11:43 amHi, @asgaros Plz check the screenshot. only see these errors when i use the given code.
Hi, @asgaros Plz check the screenshot. only see these errors when i use the given code.
Uploaded files:Quote from Asgaros on June 20, 2019, 1:38 pm@adnan
It seems that some scripts are not loaded correctly. Please try to disable some plugins which block loading of certain scripts like autoptimize.
It seems that some scripts are not loaded correctly. Please try to disable some plugins which block loading of certain scripts like autoptimize.