From f0c5635c2f072448808f35990b7f8abd84b9607d Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sun, 29 Sep 2019 15:36:59 +0200 Subject: add a dropdown to choose post visibility --- lib/helpers.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/helpers.php b/lib/helpers.php index 7dca36d..57e3374 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -298,6 +298,7 @@ function get_micropub_config(&$user, $query=[]) { // Reset the values so they can be overwritten $user->syndication_targets = ''; $user->supported_post_types = ''; + $user->supported_visibility = ''; $user->micropub_media_endpoint = ''; if(count($targets)) @@ -316,6 +317,10 @@ function get_micropub_config(&$user, $query=[]) { } } + if(isset($r['data']['visibility']) && is_array($r['data']['visibility'])) { + $user->supported_visibility = json_encode($r['data']['visibility']); + } + $user->save(); return [ -- cgit v1.2.3