Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save pirate-bot/bfccb6a270044447cce02b26571502b2 to your computer and use it in GitHub Desktop.

Select an option

Save pirate-bot/bfccb6a270044447cce02b26571502b2 to your computer and use it in GitHub Desktop.
Replace the empty author name with the source.
<?php
/*
Plugin Name: Feedzy tweak - Replace the empty author name with the source
Version: 0.0.1
Author URI: https://themeisle.com
*/
add_filter( 'feedzy_meta_date', function( $date, $date_time, $feed_url, $item ) {
$author = $item->get_author();
$permalink = $item->get_feed()->get_permalink();
if ( empty($author) ) {
$data .= __( $permalink, 'feedzy-rss-feeds' );
}
return $data;
}, 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment