Yoast\WP\SEO\Config
SEMrush_Client::__construct
SEMrush_Client constructor.
Метод класса: SEMrush_Client{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$SEMrush_Client = new SEMrush_Client(); $SEMrush_Client->__construct( $options_helper, $wp_remote_handler );
- $options_helper(Options_Helper) (обязательный)
- The Options_Helper instance.
- $wp_remote_handler(WP_Remote_Handler) (обязательный)
- The request handler.
Код SEMrush_Client::__construct() SEMrush Client:: construct Yoast 25.3
public function __construct( Options_Helper $options_helper, WP_Remote_Handler $wp_remote_handler ) { $provider = new GenericProvider( [ 'clientId' => 'yoast', 'clientSecret' => 'YdqNsWwnP4vE54WO1ugThKEjGMxMAHJt', 'redirectUri' => 'https://oauth.semrush.com/oauth2/yoast/success', 'urlAuthorize' => 'https://oauth.semrush.com/oauth2/authorize', 'urlAccessToken' => 'https://oauth.semrush.com/oauth2/access_token', 'urlResourceOwnerDetails' => 'https://oauth.semrush.com/oauth2/resource', ], [ 'httpClient' => new Client( [ 'handler' => $wp_remote_handler ] ), ] ); parent::__construct( self::TOKEN_OPTION, $provider, $options_helper ); }