Images des annonces : seul le titre peut servir de légende
Les légendes des médias ne sont plus jamais affichées sous les images des annonces et des séances. Le titre de l'image s'affiche uniquement quand « Afficher le titre des images en légende » est cochée ; sinon, aucune légende. WordPress remplit automatiquement la légende à l'upload à partir des métadonnées EXIF/IPTC du fichier (ex. « Screenshot » pour les captures macOS), ce qui faisait apparaître un texte malgré la case décochée.
This commit is contained in:
@@ -189,7 +189,6 @@ function thalim_get_single_data($post_id) {
|
||||
$data['images'][] = [
|
||||
'url' => $src,
|
||||
'alt' => get_post_meta($doc_id, '_wp_attachment_image_alt', true) ?: '',
|
||||
'caption' => thalim_bilingual(wp_get_attachment_caption($doc_id) ?: '', $lang),
|
||||
'title' => thalim_bilingual(get_the_title($doc_id) ?: '', $lang),
|
||||
'portrait' => thalim_image_is_portrait($doc_id, $w, $h),
|
||||
];
|
||||
@@ -351,7 +350,6 @@ function thalim_get_single_data($post_id) {
|
||||
$seance_data['images'][] = [
|
||||
'url' => $src,
|
||||
'alt' => get_post_meta($doc_id, '_wp_attachment_image_alt', true) ?: '',
|
||||
'caption' => thalim_bilingual(wp_get_attachment_caption($doc_id) ?: '', $lang),
|
||||
'title' => thalim_bilingual(get_the_title($doc_id) ?: '', $lang),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user