Skip to content

Instantly share code, notes, and snippets.

@tw2113
Created August 26, 2011 05:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tw2113/1172771 to your computer and use it in GitHub Desktop.
//$sec_header is supposed to be $gistgit
$gistgit = wp_remote_retrieve_body( wp_remote_get('https://api.github.com/users/'. $user .'/gists', array('timeout' => 10)));
if( is_wp_error($gistgit)) {
$error_string = $sec_header->get_error_message();
echo '<div id="message" class="error"><p>' . $error_string . '</p></div>';
wp_die('');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment