Skip to content

Instantly share code, notes, and snippets.

View tw2113's full-sized avatar
💭
Chunt's up with that?

Michael Beckwith tw2113

💭
Chunt's up with that?
View GitHub Profile
//$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('');
}