Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

WordPress User Level Conditional Logic

By: a guest on Mar 27th, 2012  |  syntax: PHP  |  size: 0.80 KB  |  views: 75  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php if (current_user_can('level_0)) {
  2.     echo do_shortcode('[enter download-monitor shortcode here]'); }  
  3.                          
  4. elseif (current_user_can('level_1)) {
  5.      echo do_shortcode('[enter download-monitor shortcode here]'); }  
  6.                          
  7. elseif (current_user_can('level_2)) {
  8.     echo do_shortcode('[enter download-monitor shortcode here]'); }  
  9.                        
  10. elseif (current_user_can('level_3)) {
  11.      echo do_shortcode('[enter download-monitor shortcode here]'); }  
  12.                        
  13. elseif (current_user_can('level_4)) {
  14.     echo do_shortcode('[enter download-monitor shortcode here]'); }  
  15.  
  16. elseif (current_user_can('level_5)) {
  17.      echo do_shortcode('[enter download-monitor shortcode here]'); }  
  18.                        
  19. elseif (current_user_can('level_6)) {
  20.     echo do_shortcode('[enter download-monitor shortcode here]'); }  
  21.                          
  22. ?>