diff --git a/classes/Media/Upload/Upload.php b/classes/Media/Upload/Upload.php index fbf4b386..3068c315 100644 --- a/classes/Media/Upload/Upload.php +++ b/classes/Media/Upload/Upload.php @@ -13,15 +13,18 @@ class Upload { * @return void */ public function add_imagify_filter_to_attachments_dropdown() { + $data = []; + /** * Tell if imagify stats query should run. * * @param bool $boolean True if the query should be run. False otherwise. */ if ( apply_filters( 'imagify_display_library_stats', false ) ) { - $optimized = imagify_count_optimized_attachments(); - $unoptimized = imagify_count_unoptimized_attachments(); - $errors = imagify_count_error_attachments(); + $data['optimized'] = imagify_count_optimized_attachments(); + $data['unoptimized'] = imagify_count_unoptimized_attachments(); + $data['errors'] = imagify_count_error_attachments(); + } $status = isset( $_GET['imagify-status'] ) ? wp_unslash( $_GET['imagify-status'] ) : 0; // WPCS: CSRF ok. @@ -34,11 +37,9 @@ public function add_imagify_filter_to_attachments_dropdown() { echo ''; echo ' ';