| @@ 71-94 (lines=24) @@ | ||
| 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( 'lsx_wetu_importer_accommodation_settings',false ); |
|
| 90 | ||
| 91 | if ( false !== $accommodation_options ) { |
|
| 92 | $this->accommodation_options = $accommodation_options; |
|
| 93 | } |
|
| 94 | } |
|
| 95 | ||
| 96 | /** |
|
| 97 | * Display the importer administration screen |
|
| @@ 71-86 (lines=16) @@ | ||
| 68 | /** |
|
| 69 | * Sets the variables used throughout the plugin. |
|
| 70 | */ |
|
| 71 | public function set_variables() { |
|
| 72 | parent::set_variables(); |
|
| 73 | $this->url = 'https://wetu.com/API/Pins/' . $this->api_key; |
|
| 74 | $this->url_qs = 'all=include'; |
|
| 75 | $temp_options = get_option( '_lsx-to_settings', false ); |
|
| 76 | ||
| 77 | if ( false !== $temp_options && isset( $temp_options[ $this->plugin_slug ] ) && ! empty( $temp_options[ $this->plugin_slug ] ) ) { |
|
| 78 | $this->options = $temp_options[ $this->plugin_slug ]; |
|
| 79 | } |
|
| 80 | ||
| 81 | $destination_options = get_option( 'lsx_wetu_importer_destination_settings', false ); |
|
| 82 | ||
| 83 | if ( false !== $destination_options ) { |
|
| 84 | $this->destination_options = $destination_options; |
|
| 85 | } |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Display the importer administration screen |
|