diff options
author | Aaron Parecki <aaron@parecki.com> | 2019-09-29 15:36:59 +0200 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2019-09-29 15:36:59 +0200 |
commit | f0c5635c2f072448808f35990b7f8abd84b9607d (patch) | |
tree | 47984c59c55a834c2ca2c2ae4388df2a6a5b6857 /lib | |
parent | efe16c375a202cff5c2b07e3c7fb273a2e8bec16 (diff) |
add a dropdown to choose post visibility
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helpers.php | 5 |
1 files changed, 5 insertions, 0 deletions
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 [ |