PluginProbe
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels / 2.3.8
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels v2.3.8
2.9.1 2.9.0 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 2.0.0 2.1.0 2.2.0 2.3.2 2.3.3 2.3.5 2.3.6 2.3.8 2.3.9 2.4.3 All 37 releases
← All changes | admin/settings.php +9 -5 2.2.02.3.8 View file →
@@ -71,10 +71,11 @@
71 71 */
72 72 public function display_settings_form() {
73 73 $gallery_settings = get_option( 'ayg_gallery_settings' );
74 74
75 - $active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $this->tabs ) ? sanitize_text_field( $_GET['tab'] ) : 'general';
76 - $active_theme = $gallery_settings['theme'];
75 + $active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $this->tabs ) ? sanitize_text_field( $_GET['tab'] ) : 'general';
76 + $active_theme = $gallery_settings['theme'];
77 + $pagination_type = $gallery_settings['pagination_type'];
77 78
78 79 require_once AYG_DIR . 'admin/templates/settings.php';
79 80 }
80 81
@@ -174,9 +175,9 @@
174 175 ),
175 176 array(
176 177 'name' => 'development_mode',
177 178 'label' => __( 'Development Mode', 'automatic-youtube-gallery' ),
178 - 'description' => __( 'Do not cache API results when checked. We strongly recommend disabling this option when your site is live.', 'automatic-youtube-gallery' ),
179 + 'description' => __( 'Does not cache API results when checked. We strongly recommend disabling this option when your site is live.', 'automatic-youtube-gallery' ),
179 180 'type' => 'checkbox',
180 181 'sanitize_callback' => 'intval'
181 182 ),
182 183 ),
@@ -190,9 +191,9 @@
190 191 'type' => 'wysiwyg',
191 192 'sanitize_callback' => 'wp_kses_post'
192 193 )
193 194 ),
194 - 'ayg_privacy_settings' => array(
195 + 'ayg_privacy_settings' => array(
195 196 array(
196 197 'name' => 'cookie_consent',
197 198 'label' => __( 'Cookie Consent', 'automatic-youtube-gallery' ),
198 199 'description' => __( 'Ask for viewer consent to store YouTube cookies before showing videos.', 'automatic-youtube-gallery' ),
@@ -643,9 +644,12 @@
643 644 */
644 645 public function ajax_callback_delete_cache() {
645 646 check_ajax_referer( 'ayg_ajax_nonce', 'security' );
646 647
647 - ayg_delete_cache();
648 + if ( current_user_can( 'manage_options' ) ) {
649 + ayg_delete_cache();
650 + }
651 +
648 652 wp_die();
649 653 }
650 654
651 655 }