Skip to content
This repository has been archived by the owner on Jan 24, 2020. It is now read-only.

Commit

Permalink
added callback for token option
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Meilick <[email protected]>
  • Loading branch information
bnomei committed Aug 25, 2019
1 parent 6e3c6de commit 6142b67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions classes/Instagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public static function instagram(string $token = null, string $endpoint = null,
if (!$token) {
$token = option('bnomei.instagram.token');
}
if (is_callable($token)) {
$token = $token();
}
$token = trim($token);

if (!$endpoint) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby3-instagram",
"type": "kirby-plugin",
"version": "1.1.1",
"version": "1.1.2",
"description": "Kirby 3 Plugin to call Instagram API Endpoints",
"license": "MIT",
"authors": [
Expand Down

0 comments on commit 6142b67

Please sign in to comment.