PluginProbe
Photonic Gallery & Lightbox for Flickr, SmugMug & Others / 3.37
Photonic Gallery & Lightbox for Flickr, SmugMug & Others v3.37
3.37 3.36 3.35 3.34 3.33 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.33 2.34 2.40 2.41 2.42 2.43 All 142 releases
← All changes | Core/AJAX.php +7 -4 3.33 → 3.37 View file →
@@ -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 = [];