//creo la funzione
function alt_immagini($html, $id) {
	return str_replace('alt=""','alt="'.get_the_title($id).'"',$html);
}
add_filter('image_send_to_editor', 'alt_immagini', 10, 2);
//10 è il parametro $priority predefinito
//2 è il $accepted_args cioè il numero di parametri assegnati alla funzione
function auto_alt_immagini($attributes, $attachment){
	if ( !isset( $attributes['alt'] ) || '' === $attributes['alt'] ) {
		$attributes['alt']=get_the_title($attachment->ID);
	}
	return $attributes;
}
add_filter('wp_get_attachment_image_attributes', 'auto_alt_immagini', 10, 2);<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://www.lasernews.it/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-2.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-3.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-4.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-5.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-6.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-7.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-8.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-9.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-10.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-11.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-12.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-13.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-14.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-15.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-16.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-17.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-18.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-19.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-20.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-21.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-22.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-23.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-24.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-post-25.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-taxonomies-post_tag-1.xml</loc></sitemap><sitemap><loc>https://www.lasernews.it/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
