Guest User

Untitled

a guest
Jun 14th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php
  2.     $wp_query_authors = new WP_User_Query( array( 'fields' => 'all_with_meta' ) );
  3.     $authors = $wp_query_authors->get_results();
  4.     foreach($authors as $author) :
  5.             $favorites = wpfp_get_users_favorites($author);
  6.             if (is_array($favorites)) :
  7.                 if (in_array($post->ID, wpfp_get_users_favorites($author))) :
  8.                     echo $author->display_name . '<br/>';
  9.                 endif;
  10.             else:
  11.                 echo "not array";
  12.             endif;
  13.     endforeach;
  14. ?>
Add Comment
Please, Sign In to add comment