Skip to content

Commit

Permalink
fix: deprecated fields now only visible when activated
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricerenck committed Dec 6, 2024
1 parent db18579 commit fc1e3e8
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 20 deletions.
5 changes: 5 additions & 0 deletions blueprints/sections/empty.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: fields
label: " "
fields:
podcasterEmpty:
type: hidden
5 changes: 5 additions & 0 deletions blueprints/sections/empty2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: fields
label: " "
fields:
podcasterEmpty2:
type: hidden
5 changes: 5 additions & 0 deletions blueprints/sections/podcasterimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: files
label: Cover Image DEPRECATED - COMPATIBILITY MODE ACTIVE
multiple: false
max: 1
template: podcaster-cover
4 changes: 4 additions & 0 deletions blueprints/sections/podcastermp3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type: files
label: Episode mp3 DEPRECATED - COMPATIBILITY MODE ACTIVE
max: 1
template: podcaster-episode
19 changes: 3 additions & 16 deletions blueprints/tabs/episode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,10 @@ columns:
cover: true
ratio: 1/1
uploads: podcaster-cover
podcasterFieldNote:
type: info
theme: negative
label: Be aware!
text: The following two fields are here for backwards compatibility. Please do not use them for new episodes. If you edit an existing episode, fill the fields above and empty the ones below this message.

podcasterMp3:
type: files
label: Episode mp3 (DEPRECATED)
max: 1
template: podcaster-episode
podcasterCover:
type: files
label: Cover Image (DEPRECATED)
multiple: false
max: 1
template: podcaster-cover
podcasterMp3: sections/podcastermp3
podcasterCover: sections/podcasterimage

- width: 2/3
sections:
podcasterInfo:
Expand Down
7 changes: 7 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@

'files/podcaster-episode' => __DIR__ . '/blueprints/files/podcaster-episode.yml',
'files/podcaster-cover' => __DIR__ . '/blueprints/files/podcaster-cover.yml',

'sections/podcastermp3' => function () {
return (option('mauricerenck.podcaster.compatibilityMode', false)) ? __DIR__ . '/blueprints/sections/podcastermp3.yml' : __DIR__ . '/blueprints/sections/empty.yml';
},
'sections/podcasterimage' => function () {
return (option('mauricerenck.podcaster.compatibilityMode', false)) ? __DIR__ . '/blueprints/sections/podcasterimage.yml' : __DIR__ . '/blueprints/sections/empty2.yml';
},
],
'templates' => [
'podcasterfeed' => __DIR__ . '/templates/podcasterfeed.php',
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'mauricerenck/podcaster',
'pretty_version' => '3.2.6',
'version' => '3.2.6.0',
'pretty_version' => '3.2.9',
'version' => '3.2.9.0',
'reference' => NULL,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand Down Expand Up @@ -38,8 +38,8 @@
'dev_requirement' => false,
),
'mauricerenck/podcaster' => array(
'pretty_version' => '3.2.6',
'version' => '3.2.6.0',
'pretty_version' => '3.2.9',
'version' => '3.2.9.0',
'reference' => NULL,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand Down

0 comments on commit fc1e3e8

Please sign in to comment.