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

Untitled

By: a guest on Feb 6th, 2013  |  syntax: PHP  |  size: 0.50 KB  |  views: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function cn_listar_autor_postagens_atividade($cn_username)
  2. {
  3.         include(ABSPATH . "wp-includes/wp-db.php");
  4.         $wpdb = new wpdb('-', '-', '-', '-');
  5.        
  6.         $cn_userid = username_exists($cn_username);
  7.         if(!$cn_userid)
  8.         {
  9.                 return false;
  10.         }
  11.         else
  12.         {
  13.                 $cn_query = $wpdb->get_results("SELECT action, content FROM wp_bp_activity WHERE user_id = '$cn_userid'");
  14.                 foreach($cn_query as $cn_key => $cn_values)
  15.                 {
  16.                         echo $cn_values->action . '<br />';
  17.                         echo $cn_values->content . '<br />';
  18.                 }
  19.  
  20.         }
  21. }
clone this paste RAW Paste Data