Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to assign admin only to show Bulk Action Drop Down


  • Anonymous User 16484011
    Inactive

    @anonymized-16484011

    Hi !

    Where can I allow only admin to show Bulk Action Drop Down Menu not for all other users.

    For Example if normal user went to their message and see inbox, stared, sent, etc page and see at the end of the page bulk action drop down menu where has the options like Bulk Actions, Mark Read, Mark Unread, Delete, etc… I want to disappear this drop down and apply button from normal users page which have not the permission of the manage_options.

    Also if there is no option to doing the same I need only Delete option from that drop down menu.

    Please see the screenshot for reference. LINK

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

  • Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    Again we have to search that dropdown file and then have to wrap the code in if(current_user_can('manage_options'))

    Thanks


    Anonymous User 16484011
    Inactive

    @anonymized-16484011

    Hi !

    Prashant,

    Thanks for your help.

    AND Sorry for that on my stupid behavior that I have already that answer but without thinking I have post a new topic. It means I have still not that type of logical thinking mind.

    Sorry for that again….

    By the way as per your last answer I really work hard to find where is that file where drop down code exist. I open and close so many files but I can’t find it.

    After frustrating on myself that there is no code exist on plugin’s any files. One thought coming on my mind that if I have that type of utility where I find the word on all php files from selected folder and as well as sub folders too. And I google and I find that this facility is in the software which I have already use Notepad++.

    Using the help of that utility I not find any files where the word “Bulk Actions” or “Add Star” etc…

    So, I tried after thinking little to try to search on Buddy Press plugin directory and I finally find that file.

    The file path is wp-content\plugins\buddypress\bp-messages\bp-messages-template.php

    I wrap the code as you earlier help me and you not believe in my first try I got the solution. I wrap as below…

    <?php if(current_user_can('manage_options')){?>
    		
    <option value="delete"><?php _e( 'Delete', 'buddypress' ); ?></option>
    	
    <?php }?>

    Yeappy !!!

    Thanks Prashant,
    Happy Diwali &
    Happy New Year in Advance.


    Prashant Singh
    Participant

    @prashantvatsh

    Happy Diwali &
    Happy New Year in Advance

    Wish you the same. Glad to know that it helped you.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar