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 +10 -6 2.1.02.3.8 View file →
@@ -42,10 +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 }
47 +
48 + // Delete the plugin cache
49 + ayg_delete_cache();
48 50
49 51 // Update the plugin version
50 52 update_option( 'ayg_version', AYG_VERSION );
51 53 }
@@ -60,9 +62,9 @@
60 62 wp_enqueue_style( 'wp-color-picker' );
61 63
62 64 wp_enqueue_style(
63 65 AYG_SLUG . '-admin',
64 - AYG_URL . 'admin/assets/css/admin.css',
66 + AYG_URL . 'admin/assets/css/admin.min.css',
65 67 array(),
66 68 AYG_VERSION,
67 69 'all'
68 70 );
@@ -78,9 +80,9 @@
78 80 wp_enqueue_script( 'wp-color-picker' );
79 81
80 82 wp_enqueue_script(
81 83 AYG_SLUG . '-admin',
82 - AYG_URL . 'admin/assets/js/admin.js',
84 + AYG_URL . 'admin/assets/js/admin.min.js',
83 85 array( 'jquery' ),
84 86 AYG_VERSION,
85 87 false
86 88 );
@@ -191,12 +193,14 @@
191 193 */
192 194 public function ajax_callback_save_api_key() {
193 195 check_ajax_referer( 'ayg_ajax_nonce', 'security' );
194 196
195 - $general_settings = get_option( 'ayg_general_settings' );
196 - $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'] );
197 200
198 - update_option( 'ayg_general_settings', $general_settings );
201 + update_option( 'ayg_general_settings', $general_settings );
202 + }
199 203
200 204 wp_die();
201 205 }
202 206