diff --git a/assets/mastodon.css b/assets/mastodon.css
index 6bcdc95..77910b1 100644
--- a/assets/mastodon.css
+++ b/assets/mastodon.css
@@ -86,8 +86,9 @@
}
.account__header__tabs__buttons .button {
margin: 0 8px;
- color: #fff;
+ border: 1px solid;
border-radius: 4px;
+ color: #fff;
padding: 0px 16px;
height: 36px;
line-height: 36px;
diff --git a/fediembedi-client.php b/fediembedi-client.php
index e6c5a35..d551839 100644
--- a/fediembedi-client.php
+++ b/fediembedi-client.php
@@ -76,7 +76,7 @@ class FediClient
$response = $this->_get('/api/v1/accounts/verify_credentials', null, $headers);
- if(property_exists($response, 'id')){
+ if(isset($response->id)){
$this->setStatic($response->id);
}
diff --git a/fediembedi-peertube-widget.php b/fediembedi-peertube-widget.php
index c8be9d1..2ee3dac 100644
--- a/fediembedi-peertube-widget.php
+++ b/fediembedi-peertube-widget.php
@@ -38,7 +38,7 @@ class FediEmbedi_PeerTube extends WP_Widget {
//widget options
$show_header = (!empty($instance['show_header'])) ? $instance['show_header'] : null;
$count = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
- $nsfw = isset( $instance['nsfw'] ) ? $instance['nsfw'] : false;
+ $nsfw = isset( $instance['nsfw'] ) ? $instance['nsfw'] : null;
$height = isset( $instance['height'] ) ? esc_attr( $instance['height'] ) : '100%';
echo $args['before_widget'];
@@ -48,6 +48,7 @@ class FediEmbedi_PeerTube extends WP_Widget {
//getVideos from remote instance
$status = $client->getVideos($actor, $is_channel, $count, $nsfw);
+ if(WP_DEBUG_DISPLAY === true): echo 'PeerTube
'; var_dump($status); echo '
diff --git a/fediembedi.php b/fediembedi.php index c65cb1c..ed02d4e 100644 --- a/fediembedi.php +++ b/fediembedi.php @@ -2,15 +2,15 @@ /** * Plugin Name: FediEmbedi * Plugin URI: https://git.feneas.org/mediaformat/fediembedi + * GitLab Plugin URI: https://git.feneas.org/mediaformat/fediembedi * Description: Widgets and shortcodes to show your Fediverse profile timeline - * Version: 0.10.7 + * Version: 0.11.0 * Author: mediaformat * Author URI: https://mediaformat.org * License: GPLv3 * License URI: https://www.gnu.org/licenses/gpl-3.0.en.html * Text Domain: fediembedi * Domain Path: /languages - * Github Plugin URI: https://github.com/mediaformat/fediembedi */ namespace FediEmbedi; require_once 'fediembedi-client.php'; diff --git a/readme.md b/readme.md index abd37d9..1b8779f 100644 --- a/readme.md +++ b/readme.md @@ -53,6 +53,12 @@ and redirected to your site with a secure token. Similar to how you would connec ## Changelog +### 0.11.0 +* Feature: PeerTube widget NSFW option. +* Fix: PeerTube number of posts to display. +* Fix: connection issues. +* Fix: Template issues. + ### 0.10.5 * Bug fix: Template issues. diff --git a/readme.txt b/readme.txt index d61fdd7..ae07c43 100644 --- a/readme.txt +++ b/readme.txt @@ -64,6 +64,12 @@ and redirected to your site with a secure token. Similar to how you would connec == Changelog == += 0.11.0 = +* Feature: PeerTube widget NSFW option. +* Fix: PeerTube number of posts to display. +* Fix: connection issues. +* Fix: Template issues. + = 0.10.5 = * Bug fix: Template issues. diff --git a/templates/mastodon.tpl.php b/templates/mastodon.tpl.php index 6101436..0800b9a 100644 --- a/templates/mastodon.tpl.php +++ b/templates/mastodon.tpl.php @@ -96,11 +96,11 @@ if(!empty($statut->media_attachments)): foreach ($statut->media_attachments as $attachment) { if (!empty($attachment->preview_url) && $attachment->type === 'image'): ?> - ; + type === 'video'): ?> -