WordPress.org

Support

Support » Plugins and Hacks » [Plugin: s2Member Buttons] Remove the buttons in Forum

[Plugin: s2Member Buttons] Remove the buttons in Forum

Viewing 2 replies - 1 through 2 (of 2 total)
  • dweuste
    Member

    @dweuste

    I came across this issue as well and figured out a way to make it work, so I thought I would share it with you.

    In the Plugin editor, find the s2member-buttons/s2memberbuttons.php file and look for the following code:

    function loggedin_button() {
       if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') ) {
         return;
       }

    So, basically I just changed the “current_user_can” to a permission only given to administrators like “create user” and so this is what that line looks like now:

    function loggedin_button() {
       if ( ! current_user_can('create_users') && ! current_user_can('edit_pages') ) {
         return;
       }

    So now, administrators still see it in the visual editor, but no one else does.

    Deyson
    Participant

    @deyson

    Thank you! It worked! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: s2Member Buttons] Remove the buttons in Forum’ is closed to new replies.