PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
← All changes | inc/admin/media.php +14 -11 1.10 → trunk View file →
@@ -1,6 +1,6 @@
1 1 <?php
2 -defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
2 +defined( 'ABSPATH' ) || exit;
3 3
4 4 add_filter( 'attachment_fields_to_edit', '_imagify_attachment_fields_to_edit', IMAGIFY_INT_MAX, 2 );
5 5 /**
6 6 * Add "Imagify" column in the Media Uploader
@@ -24,15 +24,15 @@
24 24 }
25 25
26 26 $process = imagify_get_optimization_process( $post->ID, 'wp' );
27 27
28 - $form_fields['imagify'] = array(
28 + $form_fields['imagify'] = [
29 29 'label' => 'Imagify',
30 30 'input' => 'html',
31 31 'html' => get_imagify_media_column_content( $process ),
32 32 'show_in_edit' => true,
33 33 'show_in_modal' => true,
34 - );
34 + ];
35 35
36 36 return $form_fields;
37 37 }
38 38
@@ -84,15 +84,18 @@
84 84 return $actions;
85 85 }
86 86
87 87 // Else, add action link for comparison (JS triggered).
88 - $actions['imagify-compare'] = Imagify_Views::get_instance()->get_template( 'button/compare-images', [
89 - 'url' => get_edit_post_link( $media->get_id() ) . '#imagify-compare',
90 - 'backup_url' => $media->get_backup_url(),
91 - 'original_url' => $media->get_fullsize_url(),
92 - 'media_id' => $media->get_id(),
93 - 'width' => $dimensions['width'],
94 - 'height' => $dimensions['height'],
95 - ] );
88 + $actions['imagify-compare'] = Imagify_Views::get_instance()->get_template(
89 + 'button/compare-images',
90 + [
91 + 'url' => get_edit_post_link( $media->get_id() ) . '#imagify-compare',
92 + 'backup_url' => $media->get_backup_url(),
93 + 'original_url' => $media->get_fullsize_url(),
94 + 'media_id' => $media->get_id(),
95 + 'width' => $dimensions['width'],
96 + 'height' => $dimensions['height'],
97 + ]
98 + );
96 99
97 100 return $actions;
98 101 }