| @@ -211,12 +211,15 @@ | ||
| 211 | 211 | |
| 212 | 212 | public function helper_shortcode_more() { |
| 213 | 213 | if (!empty($_POST['provider'])) { // phpcs:ignore WordPress.Security.NonceVerification |
| 214 | 214 | $provider = sanitize_text_field(wp_unslash($_POST['provider'])); // phpcs:ignore WordPress.Security.NonceVerification |
| 215 | - if (in_array($provider, ['google'], true)) { | |
| 215 | + | |
| 216 | + $tokenized_pagination_platforms = ['google']; | |
| 217 | + | |
| 218 | + if (in_array($provider, $tokenized_pagination_platforms, true)) { | |
| 216 | 219 | $attr = ['type' => $provider]; |
| 217 | 220 | if ('google' === $provider) { |
| 218 | - $attr['nextPageToken'] = sanitize_text_field(wp_unslash($_POST['nextPageToken'] ?? '')); // phpcs:ignore WordPress.Security.NonceVerification | |
| 221 | + $attr['next_page_token'] = sanitize_text_field(wp_unslash($_POST['nextPageToken'] ?? '')); // phpcs:ignore WordPress.Security.NonceVerification | |
| 219 | 222 | $attr['album_type'] = sanitize_text_field(wp_unslash($_POST['access'] ?? '')); // phpcs:ignore WordPress.Security.NonceVerification |
| 220 | 223 | $gallery = new Gallery($attr); |
| 221 | 224 | echo wp_kses($gallery->get_helper_contents(), Photonic::$safe_tags); |
| 222 | 225 | } |
| @@ -296,11 +299,11 @@ | ||
| 296 | 299 | } |
| 297 | 300 | |
| 298 | 301 | /** |
| 299 | 302 | * @param string $provider |
| 300 | - * @param array $auth_token | |
| 303 | + * @param array $auth_token | |
| 301 | 304 | */ |
| 302 | - private static function save_provider_authentication($provider, $auth_token) { | |
| 305 | + private static function save_provider_authentication(string $provider, array $auth_token) { | |
| 303 | 306 | if (current_user_can('edit_theme_options')) { // Method is private, and is only called from save_token_in_options, where there is a nonce check |
| 304 | 307 | $photonic_authentication = get_option('photonic_authentication'); |
| 305 | 308 | if (empty($photonic_authentication)) { |
| 306 | 309 | $photonic_authentication = []; |