| @@ -300,32 +300,22 @@ | ||
| 300 | 300 | ], |
| 301 | 301 | ]; |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | - $message = $remaining > 0 | |
| 305 | - ? sprintf( | |
| 306 | - /* translators: 1: images updated in this batch, 2: images still to process. */ | |
| 307 | - __('Added alt text to %1$d images. %2$d still to go — run the fix again to continue.', 'thinkrank'), | |
| 308 | - $updated, | |
| 309 | - $remaining | |
| 310 | - ) | |
| 311 | - : sprintf( | |
| 312 | - /* translators: %d: number of images updated. */ | |
| 313 | - __('Added alt text to %d images. Your media library is done.', 'thinkrank'), | |
| 314 | - $updated | |
| 315 | - ); | |
| 316 | - | |
| 317 | - // The write is done, but a cache ThinkRank cannot reach still decides | |
| 318 | - // what the visitor sees. Saying so beats a green toast over a page | |
| 319 | - // that has not changed (#763). | |
| 320 | - $warnings = (array) ($result['cache']['warnings'] ?? []); | |
| 321 | - if ([] !== $warnings) { | |
| 322 | - $message .= ' ' . implode(' ', $warnings); | |
| 323 | - } | |
| 324 | - | |
| 325 | 304 | return [ |
| 326 | 305 | 'fixed' => true, |
| 327 | - 'message' => $message, | |
| 306 | + 'message' => $remaining > 0 | |
| 307 | + ? sprintf( | |
| 308 | + /* translators: 1: images updated in this batch, 2: images still to process. */ | |
| 309 | + __('Added alt text to %1$d images. %2$d still to go — run the fix again to continue.', 'thinkrank'), | |
| 310 | + $updated, | |
| 311 | + $remaining | |
| 312 | + ) | |
| 313 | + : sprintf( | |
| 314 | + /* translators: %d: number of images updated. */ | |
| 315 | + __('Added alt text to %d images. Your media library is done.', 'thinkrank'), | |
| 316 | + $updated | |
| 317 | + ), | |
| 328 | 318 | 'data' => [ |
| 329 | 319 | 'updated' => $updated, |
| 330 | 320 | 'remaining' => $remaining, |
| 331 | 321 | ], |