@vegroland try this:
add_filter( 'feedzy_author_name', 'feedzy_author_name', 10, 3 );
function feedzy_author_name( $authorName, $feedURL, $item ) {
$source = '';
if ( is_array( $feedURL ) ) {
$link = $item->get_permalink();
// if feedURL is multiple urls.
foreach ( $feedURL as $feed ) {
if ( strpos( strtolower( $link ), 'www.lavanguardia.com' ) !== false ) {
$source = 'La Vanguardia';
} elseif ( strpos( strtolower( $link ), 'ep00.epimg.net' ) !== false ) {
$source = 'El País';
} elseif ( strpos( strtolower( $link ), 'estaticos.elmundo.es' ) !== false ) {
$source = 'El Mundo';
} elseif ( strpos( strtolower( $link ), 'api2.rtve.es' ) !== false ) {
$source = 'RTVE.es';
} elseif ( strpos( strtolower( $link ), 'www.europapress.es' ) !== false ) {
$source = 'Europa Press';
} elseif ( strpos( strtolower( $link ), 'www.abc.es' ) !== false ) {
$source = 'ABC';
} elseif ( strpos( strtolower( $link ), 'www.elperiodico.com/' ) !== false ) {
$source = 'El Periódico';
} elseif ( strpos( strtolower( $link ), 'e00-expansion.uecdn.es/' ) !== false ) {
$source = 'Expansión';
} elseif ( strpos( strtolower( $link ), 'elmundo.es/' ) !== false ) {
$source = 'El Mundo';
}
}
} else {
// if feedURL is a single url.
}
return $source;
}