The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Post Rating reset r...
 
Notifications
Clear all

Issue [Solved] Post Rating reset restriction

4 Posts
2 Users
2 Reactions
1,381 Views
(@injanebhamed)
Posts: 1
New Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 
[#5343]

Hi

First of all, thanks for the most useful lovely customizable plugin ever.

I just noticed a misspolicy about <reset post rating> option:

All wordpress Roles can reset rating in post edit page

and thats not pleased!

I, as an administrator, dont want my Authors or even Editors can be able to reset post ratings.

Hope you add an option to restrict this, or at least Hide it from <screen options> in post edit page.

Thanks.


 
Posted : 23/10/2022 4:39 am
Asti
 Asti
(@asti)
Posts: 8267
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi,

I'm going to ask the developers if there is a solution we can provide you. I'll update the topic once I get news for you.


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 24/10/2022 2:00 pm
injanebhamed reacted
Asti
 Asti
(@asti)
Posts: 8267
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@injanebhamed,

Please use the hook code below:

add_action('init', 'resrict_post_ratings_reset');

function resrict_post_ratings_reset() {
    $user = wp_get_current_user();

    if (!$user || empty($user->roles) || !is_array($user->roles)) {
        return;
    }

    $wpdiscuz = wpDiscuz();

    if (!$wpdiscuz) {
        return;
    }

    if (in_array('author', $user->roles)) {
        remove_action('add_meta_boxes', [$wpdiscuz->helper, 'addRatingResetButton'], 10);
    }
}

Using the same logic you make for other user roles:

if (in_array('author', $user->roles)) {

Put the hook code in the WordPress active theme functions.php file: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

 


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 25/10/2022 11:18 am
injanebhamed reacted
Asti
 Asti
(@asti)
Posts: 8267
Illustrious Member Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

We have not received a reply from you for over a couple of weeks, therefore we will be closing this topic. Please create a new one if you require any additional help.

Thank You!


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 11/11/2022 11:55 am