WPCF7_ConstantContact::auth_redirect()publicCF7 1.0

Метод класса: WPCF7_ConstantContact{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$WPCF7_ConstantContact = new WPCF7_ConstantContact();
$WPCF7_ConstantContact->auth_redirect();

Код WPCF7_ConstantContact::auth_redirect() CF7 5.6.4

public function auth_redirect() {
	$auth = isset( $_GET['auth'] ) ? trim( $_GET['auth'] ) : '';

	if ( self::service_name === $auth
	and current_user_can( 'wpcf7_manage_integration' ) ) {
		$redirect_to = add_query_arg(
			array(
				'service' => self::service_name,
				'action' => 'auth_redirect',
				'code' => isset( $_GET['code'] ) ? trim( $_GET['code'] ) : '',
				'state' => isset( $_GET['state'] ) ? trim( $_GET['state'] ) : '',
			),
			menu_page_url( 'wpcf7-integration', false )
		);

		wp_safe_redirect( $redirect_to );
		exit();
	}
}