Replies: 0
So I am using this awesome plugin with the filter:
add_filter( 'afip_new_post_content', 'myprefix_change_afip_post_content', 10, 2 );
/* Grabs the image source for the newly created image and inserts it
* into the new post content along with a one line paragraph. */
function myprefix_change_afip_post_content( $post_content, $attachment_id ) {
$my_uploaded_image = wp_get_attachment_image_src( $attachment_id );
$post_content = '<p>This is my new uploaded image....</p>';
$post_content .= '<img src="' . $my_uploaded_image[0] . '">';
return $post_content;
}
And I want to add an alt tag to every uploaded image which should be the same as the image’s title. Could anyone help me out?