IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
33 | 33 | */ |
34 | 34 | protected $user_location = false; |
35 | 35 | |
| 36 | /** |
| 37 | * Partially anonymized IP address of the user's network. |
| 38 | * |
| 39 | * @since 5.0.0 |
| 40 | * |
| 41 | * @var bool|string |
| 42 | */ |
| 43 | protected $unsafe_client_ip = false; |
| 44 | |
36 | 45 | /** |
37 | 46 | * Constructor for WP_Community_Events. |
38 | 47 | * |
… |
… |
|
86 | 95 | * success. |
87 | 96 | */ |
88 | 97 | public function get_events( $location_search = '', $timezone = '' ) { |
| 98 | |
| 99 | $this->unsafe_client_ip = self::get_unsafe_client_ip(); |
| 100 | |
| 101 | if ( ! $this->user_location && $this->unsafe_client_ip ) { |
| 102 | $this->user_location = [ 'ip' => $this->unsafe_client_ip ]; |
| 103 | } |
| 104 | |
89 | 105 | $cached_events = $this->get_cached_events(); |
90 | 106 | |
91 | 107 | if ( ! $location_search && $cached_events ) { |
… |
… |
|
179 | 195 | protected function get_request_args( $search = '', $timezone = '' ) { |
180 | 196 | $args = array( |
181 | 197 | 'number' => 5, // Get more than three in case some get trimmed out. |
182 | | 'ip' => self::get_unsafe_client_ip(), |
| 198 | 'ip' => $this->unsafe_client_ip, |
183 | 199 | ); |
184 | 200 | |
185 | 201 | /* |