mirror of
https://git.feneas.org/mediaformat/fediembedi
synced 2025-02-01 12:06:55 +01:00
0.110 various fixes
This commit is contained in:
parent
ca8be5e49a
commit
eb8965e25b
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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 '<details><summary>PeerTube</summary><pre>'; var_dump($status); echo '</pre></details>'; endif;
|
||||
if(!is_null($is_channel)){
|
||||
$account = $status->data[0]->channel;
|
||||
} else {
|
||||
@ -103,22 +104,22 @@ class FediEmbedi_PeerTube extends WP_Widget {
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
<?php checked( $instance[ 'show_header' ], '1' ); ?>
|
||||
id="<?php echo $this->get_field_id( 'show_header' ); ?>"
|
||||
name="<?php echo $this->get_field_name('show_header'); ?>"
|
||||
<?php checked( $instance[ 'channel' ], '1' ); ?>
|
||||
id="<?php echo $this->get_field_id( 'channel' ); ?>"
|
||||
name="<?php echo $this->get_field_name('channel'); ?>"
|
||||
value="1"
|
||||
/><?php _e( 'Show header', 'fediembedi' ); ?>
|
||||
/><?php _e( 'This account is a Channel (not a user)', 'fediembedi' ); ?>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
<?php checked( $instance[ 'channel' ], '1' ); ?>
|
||||
id="<?php echo $this->get_field_id( 'channel' ); ?>"
|
||||
name="<?php echo $this->get_field_name('channel'); ?>"
|
||||
<?php checked( $instance[ 'show_header' ], '1' ); ?>
|
||||
id="<?php echo $this->get_field_id( 'show_header' ); ?>"
|
||||
name="<?php echo $this->get_field_name('show_header'); ?>"
|
||||
value="1"
|
||||
/><?php _e( 'Is this account a Channel?', 'fediembedi' ); ?>
|
||||
/><?php _e( 'Show header', 'fediembedi' ); ?>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
|
@ -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';
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -96,11 +96,11 @@
|
||||
if(!empty($statut->media_attachments)):
|
||||
foreach ($statut->media_attachments as $attachment) {
|
||||
if (!empty($attachment->preview_url) && $attachment->type === 'image'): ?>
|
||||
<img src="<?php echo $attachment->preview_url; ?>" class="media-gallery__item" alt="<?php echo $attachment->description; ?>" loading="lazy">;
|
||||
<img src="<?php echo $attachment->preview_url; ?>" class="media-gallery__item" alt="<?php echo $attachment->description; ?>" loading="lazy">
|
||||
<?php elseif($attachment->type === 'video'): ?>
|
||||
<video src="<?php echo $attachment->url; ?>" controls poster="<?php echo $attachment->preview_url; ?>" class='media-gallery__item' alt="<?php echo $attachment->description; ?>">;
|
||||
<video src="<?php echo $attachment->url; ?>" controls poster="<?php echo $attachment->preview_url; ?>" class='media-gallery__item' alt="<?php echo $attachment->description; ?>">
|
||||
<?php elseif($attachment->type === 'audio'): ?>
|
||||
<audio src="<?php echo $attachment->url; ?>" controls poster="<?php echo $attachment->preview_url; ?>" class='media-gallery__item' alt="<?php echo $attachment->description; ?>">;
|
||||
<audio src="<?php echo $attachment->url; ?>" controls poster="<?php echo $attachment->preview_url; ?>" class='media-gallery__item' alt="<?php echo $attachment->description; ?>">
|
||||
<?php endif;
|
||||
}
|
||||
endif;
|
||||
|
@ -46,7 +46,7 @@
|
||||
</div>
|
||||
</a><?php
|
||||
elseif($attachment->type === 'video'): ?>
|
||||
<video src="<?php echo $attachment->url; ?>" controls poster="<?php echo $attachment->preview_url; ?>" class='media-gallery__item' alt="<?php echo $attachment->description; ?>">;
|
||||
<video src="<?php echo $attachment->url; ?>" controls poster="<?php echo $attachment->preview_url; ?>" class='media-gallery__item' alt="<?php echo $attachment->description; ?>">
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
<?php } ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user