Skip to content

Instantly share code, notes, and snippets.

@anthonysbrown
Created January 20, 2017 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonysbrown/811b5b4bc1e918740a11b44fc4374026 to your computer and use it in GitHub Desktop.
Save anthonysbrown/811b5b4bc1e918740a11b44fc4374026 to your computer and use it in GitHub Desktop.
Smarty Document Manager - Remove Add File Bar
<?php
#this function removes the add file bar for non admin users
#place this in your themes function.php file
add_filter('sp_cu_below_search_nav', 'remove_cdm_bar');
function remove_cdm_bar($html){
if(current_user_can('manage_options') == false){
$html = '';
}
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment