WPSEO_Remote_Request::send()
Sends the data to the given endpoint.
Метод класса: WPSEO_Remote_Request{}
Хуков нет.
Возвращает
true|false
. True when sending data has been successful.
Использование
$WPSEO_Remote_Request = new WPSEO_Remote_Request(); $WPSEO_Remote_Request->send( $method );
- $method(строка)
- The type of request to send.
По умолчанию: self::METHOD_POST
Код WPSEO_Remote_Request::send() WPSEO Remote Request::send Yoast 22.4
public function send( $method = self::METHOD_POST ) { switch ( $method ) { case self::METHOD_POST: $response = $this->post(); break; case self::METHOD_GET: $response = $this->get(); break; default: /* translators: %1$s expands to the request method */ $response = new WP_Error( 1, sprintf( __( 'Request method %1$s is not valid.', 'wordpress-seo' ), $method ) ); break; } return $this->process_response( $response ); }