From cce4f34743b28a79a1b9ae6c7cf6a9bc693b7820 Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:21:49 +1200 Subject: [PATCH] 2024 Theme: Add alt text to fallback featured images See https://github.com/WordPress/Learn/issues/2482 --- wp-content/themes/pub/wporg-learn-2024/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-content/themes/pub/wporg-learn-2024/functions.php b/wp-content/themes/pub/wporg-learn-2024/functions.php index c4ba32e31..6b0e9077b 100644 --- a/wp-content/themes/pub/wporg-learn-2024/functions.php +++ b/wp-content/themes/pub/wporg-learn-2024/functions.php @@ -332,7 +332,7 @@ function set_site_breadcrumbs( $breadcrumbs ) { */ function set_default_featured_image( $html, $post_id, $post_thumbnail_id, $size, $attr ) { if ( ! $html ) { - return ''; + return '' . esc_attr( get_the_title( $post_id ) ) . ''; } return $html;