Esempio n. 1
0
 /**
  * Send a request to OnPage.org to get the indexability
  *
  * @return int(0)|int(1)|false
  */
 protected function request_indexability()
 {
     $parameters = array();
     if ($this->wordfence_protection_enabled()) {
         $parameters['wf_strict'] = 1;
     }
     $request = new WPSEO_OnPage_Request();
     $response = $request->do_request(get_option('home'), $parameters);
     if (isset($response['is_indexable'])) {
         return (int) $response['is_indexable'];
     }
     return WPSEO_OnPage_Option::CANNOT_FETCH;
 }
Esempio n. 2
0
 /**
  * Send a request to OnPage.org to get the indexability
  *
  * @return int(0)|int(1)|false
  */
 protected function request_indexability()
 {
     $request = new WPSEO_OnPage_Request(get_option('home'));
     $response = $request->get_response();
     if (isset($response['is_indexable'])) {
         return (int) $response['is_indexable'];
     }
     return WPSEO_OnPage_Option::CANNOT_FETCH;
 }