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/admin.php +9 -9 2.2.02.3.8 View file →
@@ -42,14 +42,12 @@
42 42
43 43 // Create a custom database table "{$wpdb->prefix}ayg_videos"
44 44 if ( version_compare( AYG_VERSION, '2.1.0', '<=' ) ) {
45 45 ayg_db_create_videos_table();
46 - ayg_delete_cache();
47 46 }
48 47
49 - if ( version_compare( AYG_VERSION, '2.2.0', '<=' ) ) {
50 - delete_option( 'ayg_gallery_page_ids' );
51 - }
48 + // Delete the plugin cache
49 + ayg_delete_cache();
52 50
53 51 // Update the plugin version
54 52 update_option( 'ayg_version', AYG_VERSION );
55 53 }
@@ -64,9 +62,9 @@
64 62 wp_enqueue_style( 'wp-color-picker' );
65 63
66 64 wp_enqueue_style(
67 65 AYG_SLUG . '-admin',
68 - AYG_URL . 'admin/assets/css/admin.css',
66 + AYG_URL . 'admin/assets/css/admin.min.css',
69 67 array(),
70 68 AYG_VERSION,
71 69 'all'
72 70 );
@@ -82,9 +80,9 @@
82 80 wp_enqueue_script( 'wp-color-picker' );
83 81
84 82 wp_enqueue_script(
85 83 AYG_SLUG . '-admin',
86 - AYG_URL . 'admin/assets/js/admin.js',
84 + AYG_URL . 'admin/assets/js/admin.min.js',
87 85 array( 'jquery' ),
88 86 AYG_VERSION,
89 87 false
90 88 );
@@ -195,12 +193,14 @@
195 193 */
196 194 public function ajax_callback_save_api_key() {
197 195 check_ajax_referer( 'ayg_ajax_nonce', 'security' );
198 196
199 - $general_settings = get_option( 'ayg_general_settings' );
200 - $general_settings['api_key'] = sanitize_text_field( $_POST['api_key'] );
197 + if ( current_user_can( 'manage_options' ) ) {
198 + $general_settings = get_option( 'ayg_general_settings' );
199 + $general_settings['api_key'] = sanitize_text_field( $_POST['api_key'] );
201 200
202 - update_option( 'ayg_general_settings', $general_settings );
201 + update_option( 'ayg_general_settings', $general_settings );
202 + }
203 203
204 204 wp_die();
205 205 }
206 206