summaryrefslogtreecommitdiff
path: root/views/settings.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2018-07-20 17:59:18 -0500
committerAaron Parecki <aaron@parecki.com>2018-07-20 17:59:18 -0500
commitb749bc6c124a02a6949dc67ea703d880e1acd2ac (patch)
treee6695ac1a3a2cb59977d77434179908295e93029 /views/settings.php
parent33796f7bd5def85a5753cc3b4430769379b60475 (diff)
disable post type buttons if the server doesn't support them
Diffstat (limited to 'views/settings.php')
-rw-r--r--views/settings.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/views/settings.php b/views/settings.php
index 6b69bc2..247aaf6 100644
--- a/views/settings.php
+++ b/views/settings.php
@@ -20,6 +20,21 @@
<td>media endpoint</td>
<td><?= $this->user->micropub_media_endpoint ? '<code>'.$this->user->micropub_media_endpoint.'</code>' : '<a href="https://www.w3.org/TR/micropub/#media-endpoint">no media endpoint</a>' ?></td>
</tr>
+ <?php if($this->user->supported_post_types): ?>
+ <tr>
+ <td>supported post types</td>
+ <td>
+ <ul>
+ <?php
+ $types = json_decode($this->user->supported_post_types, true);
+ foreach($types as $type) {
+ echo '<li>'.htmlspecialchars($type['name']).' ('.$type['type'].')</li>';
+ }
+ ?>
+ </ul>
+ </td>
+ </tr>
+ <?php endif ?>
<tr>
<td width="140">access token</td>
<td><code style="word-break: break-word; white-space: pre-wrap;"><?= $this->user->micropub_access_token ?></code></td>