[Plugin: Taxonomy Images BETA] Bug report and fix: alt property of images
-
Hello!
Really enjoying this plugin — solved a major issue for me very elegantly.
One bug report: I’m getting alt=”Array” in my images.
I’m calling:
$img = $taxonomy_images_plugin->get_image_html( 'large', $term->term_taxonomy_id );
and getting back:
<img src="<url-omitted-but-correct>" alt="Array" title="" width="306" height="172" class="alignnone size-large wp-image-25" />
Looks like the culprit is line 327 of taxonomy-images.php:
$alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt' );
According to the codex page,
get_post_meta
returns an array unless you specific single=true.Changing the line to set single fixes the problem:
$alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Taxonomy Images BETA] Bug report and fix: alt property of images’ is closed to new replies.