diff --git a/app/Helpers/components_helper.php b/app/Helpers/components_helper.php index 4502c0f2..57c4ead5 100644 --- a/app/Helpers/components_helper.php +++ b/app/Helpers/components_helper.php @@ -7,6 +7,8 @@ declare(strict_types=1); * @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3 * @link https://castopod.org/ */ + +use App\Entities\Category; use App\Entities\Location; use CodeIgniter\I18n\Time; use CodeIgniter\View\Table; @@ -331,3 +333,18 @@ if (! function_exists('explicit_badge')) { } // ------------------------------------------------------------------------ + + +if (! function_exists('category_label')) { + function category_label(Category $category): string + { + $categoryLabel = ''; + if ($category->parent_id !== null) { + $categoryLabel .= lang('Podcast.category_options.' . $category->parent->code) . ' › '; + } + + return $categoryLabel . lang('Podcast.category_options.' . $category->code); + } +} + +// ------------------------------------------------------------------------ diff --git a/app/Helpers/seo_helper.php b/app/Helpers/seo_helper.php index 3a6299e7..c24ac4c3 100644 --- a/app/Helpers/seo_helper.php +++ b/app/Helpers/seo_helper.php @@ -23,7 +23,7 @@ if (! function_exists('get_podcast_metatags')) { { $category = ''; if ($podcast->category->parent_id !== null) { - $category .= $podcast->category->parent->apple_category . ' > '; + $category .= $podcast->category->parent->apple_category . ' › '; } $category .= $podcast->category->apple_category; diff --git a/app/Libraries/PodcastActor.php b/app/Libraries/PodcastActor.php index cfb98421..ac12be1c 100644 --- a/app/Libraries/PodcastActor.php +++ b/app/Libraries/PodcastActor.php @@ -37,7 +37,7 @@ class PodcastActor extends ActorObject $category = ''; if ($podcast->category->parent_id !== null) { - $category .= $podcast->category->parent->apple_category . ' > '; + $category .= $podcast->category->parent->apple_category . ' › '; } $category .= $podcast->category->apple_category; diff --git a/themes/cp_app/podcast/about.php b/themes/cp_app/podcast/about.php index 2a1178c9..f0084e8e 100644 --- a/themes/cp_app/podcast/about.php +++ b/themes/cp_app/podcast/about.php @@ -6,15 +6,11 @@
description_html ?>
- category->code, -) ?> + category) ?> other_categories as $other_category): ?> - code, -) ?> +