» : l'auteur
* principal en était absent. Le code marchait ; c'est la PROMESSE qu'il ne tenait pas.
*
* ⚠ On ne l'affiche toujours QUE s'il y a au moins un co-auteur : sans co-auteur, la
* ligne ferait doublon avec le byline du thème (« Written by … »), qui est déjà là.
*/
$auteur = get_the_author_meta( 'display_name' );
$byline = '';
if ( '' !== (string) $auteur ) {
$byline .= esc_html(
sprintf(
/* translators: 1: main author, 2: comma-separated co-authors. */
__( 'By %1$s, with %2$s', 'aiforya-multi-author' ),
(string) $auteur,
implode( ', ', $names )
)
);
} else {
$byline .= esc_html(
sprintf(
/* translators: %s: comma-separated co-authors. */
__( 'With contributions from: %s', 'aiforya-multi-author' ),
implode( ', ', $names )
)
);
}
$byline .= '
';
return $content . $byline;
}
}