示例#1
0
 /**
  * Get the Periscope username of the author of the current post
  *
  * @since 1.3.0
  *
  * @return string Periscope username or empty if no screen name stored
  */
 public static function getUsername()
 {
     if (!in_the_loop()) {
         return '';
     }
     $username = \Twitter\WordPress\User\Meta::getPeriscopeUsername(get_the_author_meta('ID'));
     if (!$username) {
         return '';
     }
     return $username;
 }