Skip to content

Commit

Permalink
Issue #44 Default author information pulled from Grav user information.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonyea committed Oct 4, 2021
1 parent 6086eea commit 9e92679
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# v3.0.4
## 10/04/2021

1. [](#new)

2. [](#improved)
* Issue #44 Series and Episode author information is prepopulated based on info in the currently signed in Grav user.

3. [](#bugfix)


# v3.0.3
## 10/02/2021

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Podcast
version: 3.0.3
version: 3.0.4
description: Creates Podcast page types and related podcast RSS feeds
icon: microphone
author:
Expand Down
2 changes: 2 additions & 0 deletions blueprints/podcast-channel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ form:
type: text
label: PLUGIN_PODCAST.ADMIN.CHANNEL.ITUNES_META.ITUNES_OWNER_LABEL
help: PLUGIN_PODCAST.ADMIN.CHANNEL.ITUNES_META.ITUNES_OWNER_HELPTEXT
data-default@: ['\Grav\Plugin\PodcastPlugin::getCurrentUserInfo', 'fullname']
header.podcast.itunes.owner.email:
type: email
label: PLUGIN_PODCAST.ADMIN.CHANNEL.ITUNES_META.ITUNES_OWNER_EMAIL_LABEL
help: PLUGIN_PODCAST.ADMIN.CHANNEL.ITUNES_META.ITUNES_OWNER_EMAIL_HELPTEXT
data-default@: ['\Grav\Plugin\PodcastPlugin::getCurrentUserInfo', 'email']
header.podcast.itunes.image:
type: filepicker
label: PLUGIN_PODCAST.ADMIN.CHANNEL.ITUNES_META.ITUNES_IMAGE_LABEL
Expand Down
1 change: 1 addition & 0 deletions blueprints/podcast-episode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ form:
type: text
label: PLUGIN_PODCAST.ADMIN.EPISODE.ITUNES_META.AUTHOR_LABEL
help: PLUGIN_PODCAST.ADMIN.EPISODE.ITUNES_META.AUTHOR_HELPTEXT
data-default@: ['\Grav\Plugin\PodcastPlugin::getCurrentUserInfo', 'fullname']
header.podcast.itunes.image:
type: filepicker
label: PLUGIN_PODCAST.ADMIN.EPISODE.ITUNES_META.IMAGE_LABEL
Expand Down
15 changes: 15 additions & 0 deletions podcast.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,19 @@ public static function getLanguageOptions()
}
return $options;
}

/**
* Returns property of current user for admin blueprints.
*
* @return string
* Property of the currently signed in user.
*/
public static function getCurrentUserInfo($property)
{
if (!$property) {
return "";
}
$grav = Grav::instance();
return $grav['user']->get($property);
}
}

0 comments on commit 9e92679

Please sign in to comment.