Example #1
0
 protected function check_domains($options)
 {
     $options = array_merge($this->options, $options);
     $model = new PLL_Model($options);
     $links_model = $model->get_links_model();
     foreach ($this->model->get_languages_list() as $lang) {
         $url = $links_model->home_url($lang);
         $response = wp_remote_get(add_query_arg('deactivate-polylang', 1, $url));
         $response_code = wp_remote_retrieve_response_code($response);
         if (200 != $response_code) {
             add_settings_error('general', 'pll_invalid_domain', esc_html(sprintf(__('Polylang was unable to access the URL %s. Please check that the URL is valid.', 'polylang'), $url)));
         }
     }
 }
Example #2
0
 public function __construct(&$options)
 {
     parent::__construct($options);
 }