Advertisement
Guest User

Untitled

a guest
Nov 1st, 2012
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function osu_author_bio($value, $user_id) {
  2.      
  3.             $runPHPFunction = false;      
  4.      
  5.             if (isset($_GET['userID'])){
  6.                     $runPHPFunction = true;
  7.             }else{
  8.                     $userID = get_query_var( 'username' );
  9.                     if (!empty($userID))
  10.                         $runPHPFunction = true;
  11.             }
  12.      
  13.      
  14.             if ($runPHPFunction)  //if we are on the userlisting page
  15.                     return nl2br($value); // this PHP function should read newlines (n) and output HTML breaks
  16.             else
  17.                     return $value;
  18.     }
  19.     add_filter('get_the_author_description', 'osu_author_bio', 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement