| @@ 71-92 (lines=22) @@ | ||
| 68 | /** |
|
| 69 | * Sets the variables used throughout the plugin. |
|
| 70 | */ |
|
| 71 | public function set_variables() { |
|
| 72 | parent::set_variables(); |
|
| 73 | ||
| 74 | // ** This request only works with API KEY ** |
|
| 75 | //if ( false !== $this->api_username && false !== $this->api_password ) { |
|
| 76 | // $this->url = 'https://wetu.com/API/Pins/'; |
|
| 77 | // $this->url_qs = 'username=' . $this->api_username . '&password=' . $this->api_password; |
|
| 78 | //} elseif ( false !== $this->api_key ) { |
|
| 79 | $this->url = 'https://wetu.com/API/Pins/' . $this->api_key; |
|
| 80 | $this->url_qs = 'all=include'; |
|
| 81 | //} |
|
| 82 | ||
| 83 | $temp_options = get_option( '_lsx-to_settings', false ); |
|
| 84 | ||
| 85 | if ( false !== $temp_options && isset( $temp_options[ $this->plugin_slug ] ) && ! empty( $temp_options[ $this->plugin_slug ] ) ) { |
|
| 86 | $this->options = $temp_options[ $this->plugin_slug ]; |
|
| 87 | } |
|
| 88 | ||
| 89 | $accommodation_options = get_option( 'wetu_importer_accommodation_settings',false ); |
|
| 90 | ||
| 91 | if ( false !== $accommodation_options ) { |
|
| 92 | $this->accommodation_options = $accommodation_options; |
|
| 93 | } |
|
| 94 | } |
|
| 95 | ||
| @@ 71-92 (lines=22) @@ | ||
| 68 | /** |
|
| 69 | * Sets the variables used throughout the plugin. |
|
| 70 | */ |
|
| 71 | public function set_variables() { |
|
| 72 | parent::set_variables(); |
|
| 73 | // ** This request only works with API KEY ** |
|
| 74 | //if ( false !== $this->api_username && false !== $this->api_password ) { |
|
| 75 | // $this->url = 'https://wetu.com/API/Pins/'; |
|
| 76 | // $this->url_qs = 'username=' . $this->api_username . '&password=' . $this->api_password; |
|
| 77 | //} elseif ( false !== $this->api_key ) { |
|
| 78 | $this->url = 'https://wetu.com/API/Pins/' . $this->api_key; |
|
| 79 | $this->url_qs = ''; |
|
| 80 | //} |
|
| 81 | ||
| 82 | $temp_options = get_option( '_lsx-to_settings', false ); |
|
| 83 | ||
| 84 | if ( false !== $temp_options && isset( $temp_options[ $this->plugin_slug ] ) && ! empty( $temp_options[ $this->plugin_slug ] ) ) { |
|
| 85 | $this->options = $temp_options[ $this->plugin_slug ]; |
|
| 86 | } |
|
| 87 | ||
| 88 | $destination_options = get_option( 'wetu_importer_destination_settings', false ); |
|
| 89 | ||
| 90 | if ( false !== $destination_options ) { |
|
| 91 | $this->destination_options = $destination_options; |
|
| 92 | } |
|
| 93 | } |
|
| 94 | ||
| 95 | /** |
|