WPCF7_Service_OAuth2::load
Метод класса: WPCF7_Service_OAuth2{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WPCF7_Service_OAuth2 = new WPCF7_Service_OAuth2(); $WPCF7_Service_OAuth2->load( $action );
- $action
- .
По умолчанию:''
Код WPCF7_Service_OAuth2::load() WPCF7 Service OAuth2::load CF7 6.1.6
public function load( $action = '' ) {
if ( 'auth_redirect' === $action ) {
$code = wpcf7_superglobal_get( 'code' );
if ( $code ) {
$this->request_token( $code );
}
if ( ! empty( $this->access_token ) ) {
$message = 'success';
} else {
$message = 'failed';
}
wp_safe_redirect( $this->menu_page_url(
array(
'action' => 'setup',
'message' => $message,
)
) );
exit();
}
}