diff --git a/classes/Instagram.php b/classes/Instagram.php index a6b3192..b310852 100644 --- a/classes/Instagram.php +++ b/classes/Instagram.php @@ -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) { diff --git a/composer.json b/composer.json index 864a671..b674b81 100644 --- a/composer.json +++ b/composer.json @@ -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": [