Skip to content

Instantly share code, notes, and snippets.

@jessepollak
Created October 22, 2013 15:00
Show Gist options
  • Save jessepollak/7102264 to your computer and use it in GitHub Desktop.
Save jessepollak/7102264 to your computer and use it in GitHub Desktop.
<?php
$args = array(
'code' => $_REQUEST['code'],
'app_id' => self::setting( 'clef_settings_app_id' ),
'app_secret' => self::setting( 'clef_settings_app_secret' ),
);
$response = wp_remote_post(
CLEF_API_BASE . 'authorize',
array( 'method'=> 'POST', 'body' => $args, 'timeout' => 20 )
);
if ( is_wp_error($response) ) {
$_SESSION['Clef_Messages'][] = "Something went wrong, please try again";
self::redirect_error();
return;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment