Skip to content

Commit

Permalink
feat: add copyright field for podcast / feed
Browse files Browse the repository at this point in the history
  • Loading branch information
eteubert committed Apr 21, 2021
1 parent 36bd634 commit 5ba1a6e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/feeds/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ function override_feed_head($hook, $podcast, $feed, $format)
add_action($hook, function () use ($podcast, $feed, $format) {
echo PHP_EOL;

if ($podcast->copyright) {
$copyright = "\t".get_xml_text_node('copyright', $podcast->copyright);
echo apply_filters('podlove_feed_itunes_author', $copyright);
echo PHP_EOL;
}

$author = "\t".get_xml_text_node('itunes:author', $podcast->author_name);
echo apply_filters('podlove_feed_itunes_author', $author);
echo PHP_EOL;
Expand Down
1 change: 1 addition & 0 deletions lib/model/podcast.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,3 +475,4 @@ private function fetch()
Podcast::property('plus_enable_proxy');
Podcast::property('funding_url');
Podcast::property('funding_label');
Podcast::property('copyright');
7 changes: 7 additions & 0 deletions lib/settings/podcast/tab/directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function process_form()
'complete',
'funding_url',
'funding_label',
'copyright',
];

$settings = get_option('podlove_podcast');
Expand Down Expand Up @@ -122,6 +123,12 @@ public function register_page()
'description' => __('Label for funding/donation URL.', 'podlove-podcasting-plugin-for-wordpress'),
'html' => ['class' => 'regular-text'],
]);

$wrapper->string('copyright', [
'label' => __('Copyright', 'podlove-podcasting-plugin-for-wordpress'),
'description' => __('Copyright notice for content in the channel.', 'podlove-podcasting-plugin-for-wordpress'),
'html' => ['class' => 'regular-text'],
]);
});
}
}
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ This product includes GeoLite2 data created by MaxMind, available from http://ww

== Changelog ==

= 2021-04-21 =

* adds copyright field in "Podcast Settings - Directory", which is apparently required by the Apple Podcast Directory since yesterday.

= 2021-04-18 =

* perf: remove frontend.js (inline logic to download button HTML)
Expand Down

0 comments on commit 5ba1a6e

Please sign in to comment.