protected function get_image_item($post, $src, $title = '', $alt = '')
{
$image = array();
/**
* Filter image URL to be included in XML sitemap for the post.
*
* @param string $src Image URL.
* @param object $post Post object.
*/
$image['src'] = apply_filters('wpseo_xml_sitemap_img_src', $src, $post);
if (!empty($title)) {
$image['title'] = $title;
}
if (!empty($alt)) {
$image['alt'] = $alt;
}
/**
* Filter image data to be included in XML sitemap for the post.
*
* @param array $image {
* Array of image data.
*
* @type string $src Image URL.
* @type string $title Image title attribute (optional).
* @type string $alt Image alt attribute (optional).
* }
*
* @param object $post Post object.
*/
return apply_filters('wpseo_xml_sitemap_img', $image, $post);
}