public
Created

  • Download Gist
gistfile1.aw
PHP
1 2 3 4 5 6 7 8 9
//$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('');
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.