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 | classes/Notices/Notices.php +14 -0 2.2.8 → trunk View file →
@@ -701,8 +701,15 @@
701 701 if ( ! is_array( $notice_data ) || empty( $notice_data['message'] ) ) {
702 702 return;
703 703 }
704 704
705 + // Deduplicate: do not add the same message twice.
706 + foreach ( $notices as $existing ) {
707 + if ( isset( $existing['message'] ) && $existing['message'] === $notice_data['message'] ) {
708 + return;
709 + }
710 + }
711 +
705 712 $notices[] = $notice_data;
706 713
707 714 set_site_transient( self::TEMPORARY_NOTICES_TRANSIENT_NAME, $notices, 30 );
708 715 }
@@ -746,8 +753,15 @@
746 753 }
747 754
748 755 if ( ! is_array( $notice_data ) || empty( $notice_data['message'] ) ) {
749 756 return;
757 + }
758 +
759 + // Deduplicate: do not add the same message twice.
760 + foreach ( $notices as $existing ) {
761 + if ( isset( $existing['message'] ) && $existing['message'] === $notice_data['message'] ) {
762 + return;
763 + }
750 764 }
751 765
752 766 $notices[] = $notice_data;
753 767