Skip to content

Commit fc1e3e8

Browse files
committed
fix: deprecated fields now only visible when activated
1 parent db18579 commit fc1e3e8

File tree

7 files changed

+33
-20
lines changed

7 files changed

+33
-20
lines changed

blueprints/sections/empty.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type: fields
2+
label: " "
3+
fields:
4+
podcasterEmpty:
5+
type: hidden

blueprints/sections/empty2.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type: fields
2+
label: " "
3+
fields:
4+
podcasterEmpty2:
5+
type: hidden
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type: files
2+
label: Cover Image DEPRECATED - COMPATIBILITY MODE ACTIVE
3+
multiple: false
4+
max: 1
5+
template: podcaster-cover
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
type: files
2+
label: Episode mp3 DEPRECATED - COMPATIBILITY MODE ACTIVE
3+
max: 1
4+
template: podcaster-episode

blueprints/tabs/episode.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,10 @@ columns:
4949
cover: true
5050
ratio: 1/1
5151
uploads: podcaster-cover
52-
podcasterFieldNote:
53-
type: info
54-
theme: negative
55-
label: Be aware!
56-
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.
5752

58-
podcasterMp3:
59-
type: files
60-
label: Episode mp3 (DEPRECATED)
61-
max: 1
62-
template: podcaster-episode
63-
podcasterCover:
64-
type: files
65-
label: Cover Image (DEPRECATED)
66-
multiple: false
67-
max: 1
68-
template: podcaster-cover
53+
podcasterMp3: sections/podcastermp3
54+
podcasterCover: sections/podcasterimage
55+
6956
- width: 2/3
7057
sections:
7158
podcasterInfo:

index.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222

2323
'files/podcaster-episode' => __DIR__ . '/blueprints/files/podcaster-episode.yml',
2424
'files/podcaster-cover' => __DIR__ . '/blueprints/files/podcaster-cover.yml',
25+
26+
'sections/podcastermp3' => function () {
27+
return (option('mauricerenck.podcaster.compatibilityMode', false)) ? __DIR__ . '/blueprints/sections/podcastermp3.yml' : __DIR__ . '/blueprints/sections/empty.yml';
28+
},
29+
'sections/podcasterimage' => function () {
30+
return (option('mauricerenck.podcaster.compatibilityMode', false)) ? __DIR__ . '/blueprints/sections/podcasterimage.yml' : __DIR__ . '/blueprints/sections/empty2.yml';
31+
},
2532
],
2633
'templates' => [
2734
'podcasterfeed' => __DIR__ . '/templates/podcasterfeed.php',

vendor/composer/installed.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php return array(
22
'root' => array(
33
'name' => 'mauricerenck/podcaster',
4-
'pretty_version' => '3.2.6',
5-
'version' => '3.2.6.0',
4+
'pretty_version' => '3.2.9',
5+
'version' => '3.2.9.0',
66
'reference' => NULL,
77
'type' => 'kirby-plugin',
88
'install_path' => __DIR__ . '/../../',
@@ -38,8 +38,8 @@
3838
'dev_requirement' => false,
3939
),
4040
'mauricerenck/podcaster' => array(
41-
'pretty_version' => '3.2.6',
42-
'version' => '3.2.6.0',
41+
'pretty_version' => '3.2.9',
42+
'version' => '3.2.9.0',
4343
'reference' => NULL,
4444
'type' => 'kirby-plugin',
4545
'install_path' => __DIR__ . '/../../',

0 commit comments

Comments
 (0)