GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (1881)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

includes/admin/class-settings.php (6 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
if ( ! class_exists( 'FooGallery_Admin_Settings' ) ) {
4
5
	/**
6
	 * Class FooGallery_Admin_Settings
7
	 */
8
	class FooGallery_Admin_Settings {
9
10
		function __construct() {
11
			add_filter( 'foogallery_admin_settings', array( $this, 'create_settings' ), 10, 2 );
12
			add_action( 'foogallery_admin_settings_custom_type_render_setting', array( $this, 'render_custom_setting_types' ) );
13
			add_action( 'foogallery_admin_settings_after_render_setting', array( $this, 'after_render_setting' ) );
14
15
			// Ajax calls
16
			add_action( 'wp_ajax_foogallery_clear_css_optimizations', array( $this, 'ajax_clear_css_optimizations' ) );
17
			add_action( 'wp_ajax_foogallery_thumb_generation_test', array( $this, 'ajax_thumb_generation_test' ) );
18
			add_action( 'wp_ajax_foogallery_apply_retina_defaults', array( $this, 'ajax_apply_retina_defaults' ) );
19
			add_action( 'wp_ajax_foogallery_uninstall', array( $this, 'ajax_uninstall' ) );
20
		}
21
22
		/**
23
		 * Create the settings for FooGallery
24
		 * @return array
25
		 */
26
		function create_settings() {
27
28
			//region General Tab
29
			$tabs['general'] = __( 'General', 'foogallery' );
30
31
			$settings[] = array(
32
				'id'      => 'clear_css_optimizations',
33
				'title'   => __( 'Clear CSS Cache', 'foogallery' ),
34
				'desc'    => sprintf( __( '%s optimizes the way it loads gallery stylesheets to improve page performance. This can lead to the incorrect CSS being loaded in some cases. Use this button to clear all the CSS optimizations that have been cached across all galleries.', 'foogallery' ), foogallery_plugin_name() ),
35
				'type'    => 'clear_optimization_button',
36
				'tab'     => 'general',
37
				'section' => __( 'Cache', 'foogallery' )
38
			);
39
40
	        $gallery_templates = foogallery_gallery_templates();
41
			$gallery_templates_choices = array();
42
			foreach ( $gallery_templates as $template ) {
43
				$gallery_templates_choices[ $template['slug'] ] = $template['name'];
44
			}
45
46
			$settings[] = array(
47
				'id'      => 'gallery_template',
48
				'title'   => __( 'Default Gallery Template', 'foogallery' ),
49
				'desc'    => __( 'The default gallery template to use for new galleries', 'foogallery' ),
50
				'default' => foogallery_get_default( 'gallery_template' ) ,
51
				'type'    => 'select',
52
				'choices' => $gallery_templates_choices,
53
				'tab'     => 'general',
54
				'section' => __( 'Gallery Defaults', 'foogallery' )
55
			);
56
57
			$settings[] = array(
58
				'id'      => 'gallery_sorting',
59
				'title'   => __( 'Default Gallery Sorting', 'foogallery' ),
60
				'desc'    => __( 'The default attachment sorting to use for new galleries', 'foogallery' ),
61
				'default' => '',
62
				'type'    => 'select',
63
				'choices' => foogallery_sorting_options(),
64
				'tab'     => 'general',
65
				'section' => __( 'Gallery Defaults', 'foogallery' )
66
			);
67
68
			$gallery_posts = get_posts( array(
69
				'post_type'     => FOOGALLERY_CPT_GALLERY,
70
				'post_status'	=> array( 'publish', 'draft' ),
71
				'cache_results' => false,
72
				'nopaging'      => true,
73
			) );
74
75
			$galleries = array();
76
77
			foreach ( $gallery_posts as $post ) {
78
				$galleries[] = array(
79
					'ID' => $post->ID,
80
					'name' => $post->post_title
81
				);
82
			}
83
84
			$gallery_choices = array();
85
			$gallery_choices[] = __( 'No default', 'foogallery' );
86
			foreach ( $galleries as $gallery ) {
87
				$gallery_choices[ $gallery['ID'] ] = $gallery['name'];
88
			}
89
90
			$settings[] = array(
91
				'id'      => 'default_gallery_settings',
92
				'title'   => __( 'Default Gallery Settings', 'foogallery' ),
93
				'desc'    => __( 'When creating a new gallery, it can use the settings from an existing gallery as the default settings. This will save you time when creating many galleries that all have the same look and feel.', 'foogallery' ),
94
				'type'    => 'select',
95
				'choices' => $gallery_choices,
96
				'tab'     => 'general',
97
				'section' => __( 'Gallery Defaults', 'foogallery' )
98
			);
99
100
			$settings[] = array(
101
				'id'      => 'caption_title_source',
102
				'title'   => __( 'Caption Title Source', 'foogallery' ),
103
				'desc'    => __( 'By default, image caption titles are pulled from the attachment "Caption" field. Alternatively, you can choose to use other fields.', 'foogallery' ),
104
				'type'    => 'select',
105
				'choices' => array(
106
					'title'   => foogallery_get_attachment_field_friendly_name( 'title' ),
107
					'caption' => foogallery_get_attachment_field_friendly_name( 'caption' ),
108
					'alt'     => foogallery_get_attachment_field_friendly_name( 'alt' ),
109
					'desc'    => foogallery_get_attachment_field_friendly_name( 'desc' )
110
				),
111
				'default' => 'caption',
112
				'tab'     => 'general',
113
				'section' => __( 'Captions', 'foogallery' ),
114
				'spacer'  => '<span class="spacer"></span>'
115
			);
116
117
			$settings[] = array(
118
				'id'      => 'caption_desc_source',
119
				'title'   => __( 'Caption Description Source', 'foogallery' ),
120
				'desc'    => __( 'By default, image caption descriptions are pulled from the attachment "Description" field. Alternatively, you can choose to use other fields.', 'foogallery' ),
121
				'type'    => 'select',
122
				'choices' => array(
123
					'title'   => foogallery_get_attachment_field_friendly_name( 'title' ),
124
					'caption' => foogallery_get_attachment_field_friendly_name( 'caption' ),
125
					'alt'     => foogallery_get_attachment_field_friendly_name( 'alt' ),
126
					'desc'    => foogallery_get_attachment_field_friendly_name( 'desc' )
127
				),
128
				'default' => 'desc',
129
				'tab'     => 'general',
130
				'section' => __( 'Captions', 'foogallery' ),
131
				'spacer'  => '<span class="spacer"></span>'
132
			);
133
134
			$settings[] = array(
135
				'id'      => 'hide_gallery_template_help',
136
				'title'   => __( 'Hide Gallery Template Help', 'foogallery' ),
137
				'desc'    => __( 'Some gallery templates show helpful tips, which are useful for new users. You can choose to hide these tips.', 'foogallery' ),
138
				'type'    => 'checkbox',
139
				'tab'     => 'general',
140
				'section' => __( 'Admin', 'foogallery' )
141
			);
142
143
			$settings[] = array(
144
				'id'      => 'hide_editor_button',
145
				'title'   => __( 'Hide WYSIWYG Editor Button', 'foogallery' ),
146
				'desc'    => sprintf( __( 'If enabled, this will hide the "Add %s" button in the WYSIWYG editor.', 'foogallery' ), foogallery_plugin_name() ),
147
				'type'    => 'checkbox',
148
				'tab'     => 'general',
149
				'section' => __( 'Admin', 'foogallery' )
150
			);
151
152
			//endregion General
153
154
			//region Images Tab
155
			$tabs['thumb'] = __( 'Images', 'foogallery' );
156
157
			$settings[] = array(
158
				'id'      => 'thumb_jpeg_quality',
159
				'title'   => __( 'Thumbnail JPEG Quality', 'foogallery' ),
160
				'desc'    => __( 'The image quality to be used when resizing JPEG images.', 'foogallery' ),
161
				'type'    => 'text',
162
				'default' => '80',
163
				'tab'     => 'thumb'
164
			);
165
166
			$settings[] = array(
167
				'id'      => 'default_retina_support',
168
				'title'   => __( 'Default Retina Support', 'foogallery' ),
169
				'desc'    => __( 'Default retina support for all new galleries that are created. This can also be overridden for each gallery.', 'foogallery' ),
170
				'type'    => 'checkboxlist',
171
				'choices' => foogallery_retina_options(),
172
				'tab'     => 'thumb'
173
			);
174
175
			$settings[] = array(
176
					'id'      => 'use_original_thumbs',
177
					'title'   => __( 'Use Original Thumbnails', 'foogallery' ),
178
					'desc'    => __( 'Allow for the original thumbnails to be used when possible. This can be useful if your thumbs are animated gifs.<br/>PLEASE NOTE : this will only work if your gallery thumbnail sizes are identical to your thumbnail sizes under Settings -> Media.', 'foogallery' ),
179
					'type'    => 'checkbox',
180
					'tab'     => 'thumb'
181
			);
182
183
			$settings[] = array(
184
				'id'      => 'thumb_resize_animations',
185
				'title'   => __( 'Resize Animated GIFs', 'foogallery' ),
186
				'desc'    => __( 'Should animated gifs be resized or not. If enabled, only the first frame is used in the resize.', 'foogallery' ),
187
				'type'    => 'checkbox',
188
				'tab'     => 'thumb'
189
			);
190
191
			$settings[] = array(
192
				'id'      => 'animated_gif_use_original_image',
193
				'title'   => __( 'Show Animated Thumbnails', 'foogallery' ),
194
				'desc'    => __( 'If animated GIFs are used, then show the original GIF as the thumbnail.', 'foogallery' ),
195
				'type'    => 'checkbox',
196
				'tab'     => 'thumb'
197
			);
198
199
			$settings[] = array(
200
				'id'      => 'thumb_generation_test',
201
				'title'   => __( 'Thumbnail Generation Test', 'foogallery' ),
202
				'desc'    => sprintf( __( 'Test to see if %s can generate the thumbnails it needs.', 'foogallery' ), foogallery_plugin_name() ),
203
				'type'    => 'thumb_generation_test',
204
				'tab'     => 'thumb'
205
			);
206
207
			//endregion Thumbnail Tab
208
209
//	        //region Advanced Tab
0 ignored issues
show
Unused Code Comprehensibility introduced by
42% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
210
//	        $tabs['advanced'] = __( 'Advanced', 'foogallery' );
211
//
212
//	        $example_url = '<code>' . trailingslashit( site_url() ) . foogallery_permalink() . '/my-cool-gallery</code>';
213
//
214
//	        $settings[] = array(
215
//		        'id'      => 'gallery_permalinks_enabled',
216
//		        'title'   => __( 'Enable Friendly URL\'s', 'foogallery' ),
217
//		        'desc'    => sprintf( __( 'If enabled, you will be able to access your galleries from a friendly URL e.g. %s', 'foogallery' ), $example_url ),
218
//		        'default' => foogallery_get_default( 'gallery_permalinks_enabled' ),
219
//		        'type'    => 'checkbox',
220
//		        'tab'     => 'advanced',
221
//	        );
222
//
223
//	        $settings[] = array(
224
//		        'id'      => 'gallery_permalink',
225
//		        'title'   => __( 'Gallery Permalink', 'foogallery' ),
226
//		        'desc'    => __( 'If friendly URL\'s are enabled, this is used in building up a friendly URL', 'foogallery' ),
227
//		        'default' => foogallery_get_default( 'gallery_permalink' ),
228
//		        'type'    => 'text',
229
//		        'tab'     => 'advanced',
230
//	        );
231
//	        //endregion Advanced
232
233
			//region Language Tab
234
			$tabs['language'] = __( 'Language', 'foogallery' );
235
236
			$settings[] = array(
237
				'id'      => 'language_images_count_none_text',
238
				'title'   => __( 'Image Count None Text', 'foogallery' ),
239
				'type'    => 'text',
240
				'default' => __( 'No images', 'foogallery' ),
241
				'tab'     => 'language'
242
			);
243
244
			$settings[] = array(
245
				'id'      => 'language_images_count_single_text',
246
				'title'   => __( 'Image Count Single Text', 'foogallery' ),
247
				'type'    => 'text',
248
				'default' => __( '1 image', 'foogallery' ),
249
				'tab'     => 'language'
250
			);
251
252
			$settings[] = array(
253
				'id'      => 'language_images_count_plural_text',
254
				'title'   => __( 'Image Count Many Text', 'foogallery' ),
255
				'type'    => 'text',
256
				'default' => __( '%s images', 'foogallery' ),
257
				'tab'     => 'language'
258
			);
259
			//endregion Language Tab
260
261
			//region Advanced Tab
262
			$tabs['advanced'] = __( 'Advanced', 'foogallery' );
263
264
            $settings[] = array(
265
                'id'      => 'enable_custom_ready',
266
                'title'   => __( 'Custom Ready Event', 'foogallery' ),
267
                'desc'    => sprintf( __( 'By default the jQuery ready event is used, but there are sometimes unavoidable javascript errors on the page, which could result in the default gallery templates not initializing correctly. Enable this setting to use a built-in custom ready event to overcome this if needed.', 'foogallery' ), foogallery_plugin_name() ),
268
                'type'    => 'checkbox',
269
                'tab'     => 'advanced'
270
            );
271
272
			$settings[] = array(
273
				'id'      => 'enable_legacy_thumb_cropping',
274
				'title'   => __( 'Enable Legacy Thumb Cropping', 'foogallery' ),
275
				'desc'    => __( 'For when you want to enable legacy cropping options in certain gallery templates. This is not recommended.', 'foogallery' ),
276
				'type'    => 'checkbox',
277
				'tab'     => 'advanced'
278
			);
279
280
			$settings[] = array(
281
				'id'      => 'output_json_to_script_block',
282
				'title'   => __( 'Output Gallery JSON to Script Block', 'foogallery' ),
283
				'desc'    => __( 'Some plugins conflict with the default way of rendering gallery items to the container. Enabling this setting will output gallery items to a separate script block.', 'foogallery' ),
284
				'type'    => 'checkbox',
285
				'tab'     => 'advanced'
286
			);
287
288
			$settings[] = array(
289
				'id'      => 'enable_debugging',
290
				'title'   => __( 'Enable Debugging', 'foogallery' ),
291
				'desc'    => sprintf( __( 'Helps to debug problems and diagnose issues. Enable debugging if you need support for an issue you are having.', 'foogallery' ), foogallery_plugin_name() ),
292
				'type'    => 'checkbox',
293
				'tab'     => 'advanced'
294
			);
295
296
			$settings[] = array(
297
				'id'      => 'uninstall',
298
				'title'   => __( 'Full Uninstall', 'foogallery' ),
299
				'desc'    => sprintf( __( 'Run a full uninstall of %s, which includes removing all galleries, settings and metadata. This basically removes all traces of the plugin from your system. Please be careful - there is no undo!', 'foogallery' ), foogallery_plugin_name() ),
300
				'type'    => 'uninstall',
301
				'tab'     => 'advanced'
302
			);
303
304
//			$settings[] = array(
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
305
//				'id'      => 'force_https',
306
//				'title'   => __( 'Force HTTPS', 'foogallery' ),
307
//				'desc'    => __( 'Force all thumbnails to use HTTPS protocol.', 'foogallery' ),
308
//				'type'    => 'checkbox',
309
//				'tab'     => 'advanced'
310
//			);
311
312
			$settings[] = array(
313
				'id'      => 'use_future_endpoint',
314
				'title'   => __( 'Use Beta Endpoint', 'foogallery' ),
315
				'desc'    => __( 'The list of available extensions are pulled from an external URL. You can also pull from a "beta" endpoint which will sometimes contain beta extensions that are not publicly available.', 'foogallery' ),
316
				'type'    => 'checkbox',
317
				'tab'     => 'advanced',
318
			);
319
320
			$settings[] = array(
321
				'id'      => 'override_thumb_test',
322
				'title'   => __( 'Override Thumb Test', 'foogallery' ),
323
				'desc'    => __( 'Sometimes there are problems running the thumbnail generation test. This overrides the test to use a remote image from our CDN.', 'foogallery' ),
324
				'type'    => 'checkbox',
325
				'tab'     => 'advanced',
326
			);
327
328
			//endregion Advanced Tab
329
330
			return apply_filters( 'foogallery_admin_settings_override', array(
331
				'tabs'     => $tabs,
332
				'sections' => array(),
333
				'settings' => $settings,
334
			) );
335
		}
336
337
		/**
338
		 * Render any custom setting types to the settings page
339
		 */
340
		function render_custom_setting_types( $args ) {
341
			if ( 'clear_optimization_button' === $args['type'] ) { ?>
342
				<div id="foogallery_clear_css_optimizations_container">
343
					<input type="button" data-nonce="<?php echo esc_attr( wp_create_nonce( 'foogallery_clear_css_optimizations' ) ); ?>" class="button-primary foogallery_clear_css_optimizations" value="<?php _e( 'Clear CSS Optimization Cache', 'foogallery' ); ?>">
344
					<span id="foogallery_clear_css_cache_spinner" style="position: absolute" class="spinner"></span>
345
				</div>
346
			<?php } else if ( 'uninstall' === $args['type'] ) { ?>
347
				<div id="foogallery_uninstall_container">
348
					<input type="button" data-nonce="<?php echo esc_attr( wp_create_nonce( 'foogallery_uninstall' ) ); ?>" class="button-primary foogallery_uninstall" value="<?php _e( 'Run Full Uninstall', 'foogallery' ); ?>">
349
					<span id="foogallery_uninstall_spinner" style="position: absolute" class="spinner"></span>
350
				</div>
351
			<?php } else if ( 'thumb_generation_test' === $args['type'] ) { ?>
352
				<div id="foogallery_thumb_generation_test_container">
353
					<input type="button" data-nonce="<?php echo esc_attr( wp_create_nonce( 'foogallery_thumb_generation_test' ) ); ?>" class="button-primary foogallery_thumb_generation_test" value="<?php _e( 'Run Tests', 'foogallery' ); ?>">
354
					<span id="foogallery_thumb_generation_test_spinner" style="position: absolute" class="spinner"></span>
355
				</div>
356
			<?php }
357
		}
358
359
		function after_render_setting( $args ) {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
360
			if ( 'default_retina_support' === $args['id'] ) {
361
362
				//build up a list of retina options and add them to a hidden input
363
				// so we can get the values on the client
364
				$input_ids = array();
365
				$count = 0;
366
				foreach( foogallery_retina_options() as $retina_option ) {
367
					$input_ids[] = '#default_retina_support' . $count;
368
					$count++;
369
				}
370
				$nonce = wp_create_nonce( 'foogallery_apply_retina_defaults' );
371
				?><div id="foogallery_apply_retina_support_container">
372
					<input type="button" data-inputs="<?php echo implode( ',', $input_ids ); ?>" data-nonce="<?php echo esc_attr( $nonce ); ?>" class="button-primary foogallery_apply_retina_support" value="<?php _e( 'Apply Defaults to all Galleries', 'foogallery' ); ?>">
373
					<span id="foogallery_apply_retina_support_spinner" style="position: absolute" class="spinner"></span>
374
				</div>
375
			<?php }
376
		}
377
378
		/**
379
		 * AJAX endpoint for clearing all CSS optimizations
380
		 */
381
		function ajax_clear_css_optimizations() {
382
			if ( check_admin_referer( 'foogallery_clear_css_optimizations' ) ) {
383
				foogallery_clear_all_css_load_optimizations();
384
385
				_e('The CSS optimization cache was successfully cleared!', 'foogallery' );
386
				die();
387
			}
388
		}
389
390
		/**
391
		 * AJAX endpoint for testing thumbnail generation using WPThumb
392
		 */
393
		function ajax_thumb_generation_test() {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
394
			if ( check_admin_referer( 'foogallery_thumb_generation_test' ) ) {
395
				foogallery_output_thumbnail_generation_results();
396
				die();
397
			}
398
		}
399
400
		/**
401
		 * AJAX endpoint for applying the retina defaults to all galleries
402
		 */
403
		function ajax_apply_retina_defaults() {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
404
			if ( check_admin_referer( 'foogallery_apply_retina_defaults' ) ) {
405
406
				$defaults = $_POST['defaults'];
407
408
				//extract the settings using a regex
409
				$regex = '/foogallery\[default_retina_support\|(?<setting>.+?)\]/';
410
411
				preg_match_all($regex, $defaults, $matches);
412
413
				$gallery_retina_settings = array();
414
415
				if ( isset( $matches[1] ) ) {
416
					foreach ( $matches[1] as $match ) {
417
						$gallery_retina_settings[$match] = "true";
418
					}
419
				}
420
421
				//go through all galleries and update the retina settings
422
				$galleries = foogallery_get_all_galleries();
423
				$gallery_update_count = 0;
424
				foreach ( $galleries as $gallery ) {
425
					update_post_meta( $gallery->ID, FOOGALLERY_META_RETINA, $gallery_retina_settings );
426
					$gallery_update_count++;
427
				}
428
429
				echo sprintf( _n(
430
					'1 gallery successfully updated to use the default retina settings.',
431
					'%s galleries successfully updated to use the default retina settings.',
432
					$gallery_update_count, 'foogallery' ), $gallery_update_count );
433
434
				die();
435
			}
436
		}
437
438
		function ajax_uninstall() {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
439
			if ( check_admin_referer( 'foogallery_uninstall' ) && current_user_can( 'install_plugins' ) ) {
440
				foogallery_uninstall();
441
442
				_e('All traces of the plugin were removed from your system!', 'foogallery' );
443
				die();
444
			}
445
		}
446
	}
447
}
448