Compare commits

...

17 Commits

Author SHA1 Message Date
Django Doucet 4fc8038a57 Merge branch 'hotfix/v0.11.1' 2021-01-14 23:09:59 -05:00
Django Doucet 59ae0f7b76 fix style 2021-01-14 23:06:08 -05:00
Django Doucet b6fef90e91 better template class names, fix shortcode 2021-01-14 23:04:30 -05:00
Django Doucet 6be91f1c1c Merge branch 'release/v0.11.0' 2020-10-27 23:35:53 -04:00
Django Doucet 86fbfe5457 add class names to templates 2020-10-27 23:33:46 -04:00
Django Doucet eb8965e25b 0.110 various fixes 2020-10-27 23:24:25 -04:00
Django Doucet ca8be5e49a templates fixes 2020-10-23 14:10:01 -04:00
Django Doucet fe58f3c73f fix templates 2020-10-22 08:54:25 -04:00
Django Doucet db2bb224c1 Fix count on peertube widget, add nsfw option 2020-10-20 22:55:07 -04:00
Django Doucet f5b4195489 Merge branch 'hotfix/v0.10.4' 2020-03-11 19:48:27 -04:00
Django Doucet aa239d24bc Merge tag 'v0.10.4' into develop
Bug fix: Shortcode embed was causing post save issues
2020-03-11 19:48:27 -04:00
Django Doucet a605a8cc46 Bug fix: Shortcode embed included in post edit screen, causing post save issues 2020-03-11 19:47:49 -04:00
Django Doucet 9eb8406003 Merge tag 'v0.10.3' into develop
Security fix: Please update all versions to 0.10.3
2020-03-11 01:05:23 -04:00
Django Doucet 875c6baba1 Merge tag 'v0.10.2' into develop
no message
2020-03-11 00:46:27 -04:00
Django Doucet a2867570e5 Merge tag 'v0.10.1' into develop
no message
2020-03-10 01:07:50 -04:00
Django Doucet 48130f31fe Merge tag '0.10.1' into develop
no message
2020-03-10 01:02:41 -04:00
Django Doucet 7f9236f1ab Merge tag 'v0.10.0' into develop
no message
2020-03-10 00:14:40 -04:00
12 changed files with 148 additions and 69 deletions

View File

@ -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;

View File

@ -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);
}
@ -138,14 +138,28 @@ class FediClient
return $response;
}
public function getVideos($account_id, $is_channel) {
public function getVideos($account_id, $is_channel, $count, $nsfw = false) {
//https://docs.joinpeertube.org/api-rest-reference.html#tag/Video
$headers = array();
$query = http_build_query(array(
//'categoryOneOf' => $categoryID,
'count' => $count,
//'filter' => $filter,
//'languageOneOf' => $lang,
//'licenceOneOf' => $licence,
'nsfw' => $nsfw,
//'skipCount' => $skipCount,
//'sort' => $sort,
//'start' => $offset,
//'tagsAllOf' => $tagsAllOf,//videos where all tags are present
//'tagsOneOf' => $tags
));
if(!is_null($is_channel)){
$response = $this->_get("/api/v1/video-channels/{$account_id}/videos", null, $headers);
$response = $this->_get("/api/v1/video-channels/{$account_id}/videos?{$query}", null, $headers);
} else {
$response = $this->_get("/api/v1/accounts/{$account_id}/videos", null, $headers);
$response = $this->_get("/api/v1/accounts/{$account_id}/videos?{$query}", null, $headers);
}
return $response;

View File

@ -17,13 +17,13 @@ class FediEmbedi_Mastodon extends WP_Widget {
}
/**
* Outputs the content for the current Search widget instance.
* Outputs the content for the current Mastodon widget instance.
*
* @since 2.8.0
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
* @param array $instance Settings for the current Search widget instance.
* @param array $instance Settings for the current Mastodon widget instance.
*/
public function widget( $args, $instance ) {
$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
@ -40,7 +40,7 @@ class FediEmbedi_Mastodon extends WP_Widget {
$pinned = (!empty($instance['pinned'])) ? $instance['pinned'] : '';
$exclude_replies = (!empty($instance['exclude_replies'])) ? $instance['exclude_replies'] : '';
$exclude_reblogs = (!empty($instance['exclude_reblogs'])) ? $instance['exclude_reblogs'] : '';
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
$limit = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
$height = isset( $instance['height'] ) ? esc_attr( $instance['height'] ) : '100%';
echo $args['before_widget'];
@ -49,7 +49,7 @@ class FediEmbedi_Mastodon extends WP_Widget {
};
//getStatus from remote instance
$status = $client->getStatus($only_media, $pinned, $exclude_replies, null, null, null, $number, $exclude_reblogs);
$status = $client->getStatus($only_media, $pinned, $exclude_replies, null, null, null, $limit, $exclude_reblogs);
//if(WP_DEBUG_DISPLAY === true): echo '<details><summary>Mastodon</summary><pre>'; var_dump($status); echo '</pre></details>'; endif;
$account = $status[0]->account;
include(plugin_dir_path(__FILE__) . 'templates/mastodon.tpl.php' );
@ -58,7 +58,7 @@ class FediEmbedi_Mastodon extends WP_Widget {
}
/**
* Outputs the settings form for the Search widget.
* Outputs the settings form for the Mastodon widget.
*
* @since 2.8.0
*
@ -72,7 +72,7 @@ class FediEmbedi_Mastodon extends WP_Widget {
$pinned = (!empty($instance['pinned'])) ? $instance['pinned'] : NULL;
$exclude_replies = (!empty($instance['exclude_replies'])) ? $instance['exclude_replies'] : NULL;
$exclude_reblogs = (!empty($instance['exclude_reblogs'])) ? $instance['exclude_reblogs'] : NULL;
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
$limit = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
$height = isset( $instance['height'] ) ? esc_attr( $instance['height'] ) : '';
?>
@ -138,7 +138,7 @@ class FediEmbedi_Mastodon extends WP_Widget {
</p>
<p>
<label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to display:' ); ?><br>
<input class="tiny-text" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="number" step="1" min="1" value="<?php echo $number; ?>" size="3" />
<input class="tiny-text" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="number" step="1" min="1" value="<?php echo $limit; ?>" size="3" />
<small>Max: 20</small>
</label>
</p>
@ -152,7 +152,7 @@ class FediEmbedi_Mastodon extends WP_Widget {
}
/**
* Handles updating settings for the current Search widget instance.
* Handles updating settings for the current Mastodon widget instance.
*
* @since 2.8.0
*
@ -174,5 +174,4 @@ class FediEmbedi_Mastodon extends WP_Widget {
$instance['height'] = sanitize_text_field( $new_instance['height'] );
return $instance;
}
}

View File

@ -17,13 +17,13 @@ class FediEmbedi_PeerTube extends WP_Widget {
}
/**
* Outputs the content for the current Search widget instance.
* Outputs the content for the current PeerTube widget instance.
*
* @since 2.8.0
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
* @param array $instance Settings for the current Search widget instance.
* @param array $instance Settings for the current PeerTube widget instance.
*/
public function widget( $args, $instance ) {
$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
@ -37,7 +37,8 @@ class FediEmbedi_PeerTube extends WP_Widget {
//widget options
$show_header = (!empty($instance['show_header'])) ? $instance['show_header'] : null;
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
$count = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
$nsfw = isset( $instance['nsfw'] ) ? $instance['nsfw'] : null;
$height = isset( $instance['height'] ) ? esc_attr( $instance['height'] ) : '100%';
echo $args['before_widget'];
@ -46,20 +47,21 @@ class FediEmbedi_PeerTube extends WP_Widget {
};
//getVideos from remote instance
$status = $client->getVideos($actor, $is_channel);
$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 {
$account = $status->data[0]->account;
}
include(plugin_dir_path(__FILE__) . 'templates/peertube.tpl.php' );
echo $args['after_widget'];
}
/**
* Outputs the settings form for the Search widget.
* Outputs the settings form for the PeerTube widget.
*
* @since 2.8.0
*
@ -79,6 +81,7 @@ class FediEmbedi_PeerTube extends WP_Widget {
$exclude_replies = (!empty($instance['exclude_replies'])) ? $instance['exclude_replies'] : NULL;
$exclude_reblogs = (!empty($instance['exclude_reblogs'])) ? $instance['exclude_reblogs'] : NULL;
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 5;
$nsfw = isset( $instance['nsfw'] ) ? $instance['nsfw'] : false;
$height = isset( $instance['height'] ) ? esc_attr( $instance['height'] ) : '';
?>
@ -98,6 +101,17 @@ class FediEmbedi_PeerTube extends WP_Widget {
</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'); ?>"
value="1"
/><?php _e( 'This account is a Channel (not a user)', 'fediembedi' ); ?>
</label>
</p>
<p>
<label>
<input
type="checkbox"
@ -106,17 +120,6 @@ class FediEmbedi_PeerTube extends WP_Widget {
name="<?php echo $this->get_field_name('show_header'); ?>"
value="1"
/><?php _e( 'Show header', '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'); ?>"
value="1"
/><?php _e( 'Is this account a Channel?', 'fediembedi' ); ?>
</label>
</p>
<p>
@ -126,6 +129,17 @@ class FediEmbedi_PeerTube extends WP_Widget {
</label>
</p>
<p>
<label>
<input
type="checkbox"
<?php checked( $instance[ 'nsfw' ], '0' ); ?>
id="<?php echo $this->get_field_id( 'nsfw' ); ?>"
name="<?php echo $this->get_field_name('nsfw'); ?>"
value="0"
/><?php _e( 'Show NSFW videos?', 'fediembedi' ); ?>
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id( 'height' ); ?>"><?php _e( 'Widget height:' ); ?><br>
<input class="" id="<?php echo $this->get_field_id( 'height' ); ?>" name="<?php echo $this->get_field_name( 'height' ); ?>" type="text" value="<?php echo $height; ?>" placeholder="500px" size="5" />
<small><?php _e( 'Default: 100%', 'fediembedi' ); ?></small>
@ -135,7 +149,7 @@ class FediEmbedi_PeerTube extends WP_Widget {
}
/**
* Handles updating settings for the current Search widget instance.
* Handles updating settings for the current PeerTube widget instance.
*
* @since 2.8.0
*
@ -157,8 +171,8 @@ class FediEmbedi_PeerTube extends WP_Widget {
$instance['exclude_replies'] = $new_instance['exclude_replies'];
$instance['exclude_reblogs'] = $new_instance['exclude_reblogs'];
$instance['number'] = (int) $new_instance['number'];
$instance['nsfw'] = $new_instance['nsfw'];
$instance['height'] = sanitize_text_field( $new_instance['height'] );
return $instance;
}
}

View File

@ -17,13 +17,13 @@ class FediEmbedi_Pixelfed extends WP_Widget {
}
/**
* Outputs the content for the current Search widget instance.
* Outputs the content for the current Pixelfed widget instance.
*
* @since 2.8.0
*
* @param array $args Display arguments including 'before_title', 'after_title',
* 'before_widget', and 'after_widget'.
* @param array $instance Settings for the current Search widget instance.
* @param array $instance Settings for the current Pixelfed widget instance.
*/
public function widget( $args, $instance ) {
$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
@ -61,7 +61,7 @@ class FediEmbedi_Pixelfed extends WP_Widget {
}
/**
* Outputs the settings form for the Search widget.
* Outputs the settings form for the Pixelfed widget.
*
* @since 2.8.0
*
@ -155,7 +155,7 @@ class FediEmbedi_Pixelfed extends WP_Widget {
}
/**
* Handles updating settings for the current Search widget instance.
* Handles updating settings for the current Pixelfed widget instance.
*
* @since 2.8.0
*
@ -177,5 +177,4 @@ class FediEmbedi_Pixelfed extends WP_Widget {
$instance['height'] = sanitize_text_field( $new_instance['height'] );
return $instance;
}
}

View File

@ -68,7 +68,7 @@ class WP_Widget_fediembedi extends WP_Widget {
case 'PeerTube':
//getVideos from remote instance
$status = $client->getVideos();
if(WP_DEBUG_DISPLAY === true): echo '<details><summary>'. $instance_type .'</summary><pre>'; var_dump($status); echo '</pre></details>'; endif;
//if(WP_DEBUG_DISPLAY === true): echo '<details><summary>'. $instance_type .'</summary><pre>'; var_dump($status); echo '</pre></details>'; endif;
include(plugin_dir_path(__FILE__) . 'templates/peertube.tpl.php' );
break;
default:

View File

@ -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.3
* Version: 0.11.1
* 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';
@ -104,13 +104,13 @@ class FediConfig
} else {
switch ($instance_type) {
case 'mastodon':
update_option('fediembedi-mastodon-client-id', '');
update_option('fediembedi-mastodon-client-secret', '');
update_option('fediembedi-mastodon-client-id', $client_id);//
update_option('fediembedi-mastodon-client-secret', $client_secret);//
update_option('fediembedi-mastodon-token', $token->access_token);
break;
case 'pixelfed':
update_option('fediembedi-pixelfed-client-id', '');
update_option('fediembedi-pixelfed-client-secret', '');
update_option('fediembedi-pixelfed-client-id', $client_id);//
update_option('fediembedi-pixelfed-client-secret', $client_secret);//
update_option('fediembedi-pixelfed-token', $token->access_token);
break;
}
@ -170,6 +170,7 @@ class FediConfig
'limit' => 5,
'exclude_reblogs' => false,
'show_header' => true,
'height' => '100%',
), $atts, 'mastodon' );
//getStatus from remote instance
@ -177,7 +178,9 @@ class FediConfig
//if(WP_DEBUG_DISPLAY === true): echo '<details><summary>Mastodon</summary><pre>'; var_dump($status); echo '</pre></details>'; endif;
$show_header = $atts['show_header'];
$account = $status[0]->account;
ob_start();
include(plugin_dir_path(__FILE__) . 'templates/mastodon.tpl.php' );
return ob_get_clean();
}
public function pixelfed_shortcode($atts){
@ -197,14 +200,20 @@ class FediConfig
'limit' => 9,
'exclude_reblogs' => false,
'show_header' => true,
'height' => '100%',
), $atts, 'pixelfed' );
//getStatus from remote instance
$status = $client->getStatus($atts['only_media'], $atts['pinned'], $atts['exclude_replies'], null, null, null, $atts['limit'], $atts['exclude_reblogs']);
//if(WP_DEBUG_DISPLAY === true): echo '<details><summary>Mastodon</summary><pre>'; var_dump($client->getStatus($atts)); echo '</pre></details>'; endif;
//if(WP_DEBUG_DISPLAY === true): echo '<details><summary>Pixelfed</summary><pre>'; var_dump($client->getStatus($atts)); echo '</pre></details>'; endif;
$show_header = $atts['show_header'];
$account = $status[0]->account;
include(plugin_dir_path(__FILE__) . 'templates/pixelfed.tpl.php' );
if($account = $status[0]->account){
ob_start();
include(plugin_dir_path(__FILE__) . 'templates/pixelfed.tpl.php' );
return ob_get_clean();
} else {
return;
}
}
public function peertube_shortcode($atts){
@ -214,23 +223,30 @@ class FediConfig
'actor' => null,
'is_channel' => null,
'limit' => 9,
'nsfw' => null,
'show_header' => true,
'height' => '100%',
), $atts, 'peertube' );
$atts['instance'] = \esc_attr( $atts['instance'], 'https' );
$client = new \FediClient($atts['instance']);
//getVideos from remote instance
$status = $client->getVideos($atts['actor'], $atts['is_channel']);
$status = $client->getVideos($atts['actor'], $atts['is_channel'], $atts['limit'], $atts['nsfw'] );
if(!is_null($atts['is_channel'])){
$account = $status->data[0]->channel;
} else {
$account = $status->data[0]->account;
}
//if(WP_DEBUG_DISPLAY === true): echo '<details><summary>PeerTube</summary><pre>'; var_dump($status); echo '</pre></details>'; endif;
if(WP_DEBUG_DISPLAY === true): echo '<details><summary>PeerTube</summary><pre>'; var_dump($status); echo '</pre></details>'; endif;
$show_header = $atts['show_header'];
include(plugin_dir_path(__FILE__) . 'templates/peertube.tpl.php' );
$height = $atts['height'];
ob_start();
include( plugin_dir_path(__FILE__) . 'templates/peertube.tpl.php' );
return ob_get_clean();
}
/*

View File

@ -53,6 +53,22 @@ and redirected to your site with a secure token. Similar to how you would connec
## Changelog
### 0.11.1
* Bug fix: Shortcode limit attribute.
* Document: Shortcodes on options page.
### 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.
### 0.10.4
* Bug fix: Embed included in post edit screen, causing post save issues.
### 0.10.3
* Security fix: statuses with visibility marked unlisted, private, and direct could be displayed publicly

View File

@ -64,6 +64,22 @@ and redirected to your site with a secure token. Similar to how you would connec
== Changelog ==
= 0.11.1 =
* Bug fix: Shortcode limit attribute.
* Document: Shortcodes on options page.
= 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.
= 0.10.4 =
* Bug fix: Embed included in post edit screen, causing post save issues
= 0.10.3 =
* Security fix: statuses with visibility marked unlisted, private, and direct could be displayed publicly

View File

@ -1,5 +1,5 @@
<!-- mastodon -->
<div class="scrollable" style="height: <?php echo $height; ?>;">
<div class="fediembedi fediembedi-mastodon scrollable" <?php if (!empty($height)) : echo "style='height: $height;'"; endif; ?>>
<div role="feed">
<?php if($show_header): ?>
<div class="account-timeline__header">
@ -95,13 +95,13 @@
endif;
if(!empty($statut->media_attachments)):
foreach ($statut->media_attachments as $attachment) {
if (!empty($attachment->preview_url) && $attachment->type === 'image'):
echo "<img src='" . $attachment->preview_url . "' class='media-gallery__item' alt='" . $attachment->description . "' loading='lazy'>";
elseif($attachment->type === 'video'):
echo "<video src=" . $attachment->url . " controls poster='" . $attachment->preview_url . "' class='media-gallery__item' alt=" . $attachment->description . ">";
elseif($attachment->type === 'audio'):
echo "<audio src=" . $attachment->url . " controls poster='" . $attachment->preview_url . "' class='media-gallery__item' alt=" . $attachment->description . ">";
endif;
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">
<?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; ?>">
<?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; ?>">
<?php endif;
}
endif;
?></div>
@ -112,3 +112,4 @@
<?php } ?>
</div>
</div>
<?php

View File

@ -1,5 +1,5 @@
<!-- peertube -->
<div class="scrollable" style="height: <?php echo $height; ?>;">
<div class="fediembedi fediembedi-peertube scrollable" <?php if (!empty($height)) : echo "style='height: $height;'"; endif; ?>>
<div role="feed">
<?php if($show_header): ?>
<div class="peertube-timeline__header">
@ -51,3 +51,4 @@
</div>
</div>
</div>
<?php

View File

@ -1,5 +1,5 @@
<!-- pixelfed -->
<div class="scrollable" style="height: <?php echo $height; ?>;">
<div class="fediembedi fediembedi-pixelfed scrollable" <?php if (!empty($height)) : echo "style='height: $height;'"; endif; ?>>
<div role="feed" class="embed-card pixelfed">
<div class="pixelfed-inner card status-card-embed card-md-rounded-0 border">
<?php if($show_header): ?>
@ -37,25 +37,27 @@
<div class="pixelfed-images row mt-4 mb-1 px-1">
<?php foreach ($status as $statut) { ?>
<article class="col-4 mt-2 px-0"><?php
if (!empty($statut->media_attachments[0]->preview_url) && $statut->media_attachments[0]->type === 'image'): ?>
$attachment = $statut->media_attachments[0];
if (!empty($attachment->preview_url) && $attachment->type === 'image'): ?>
<a href="<?php echo $statut->url; ?>" class="card info-overlay card-md-border-0 px-1 shadow-none" target="_blank" rel="noopener">
<div class="square">
<div style='background-image: url(<?php echo $statut->media_attachments[0]->preview_url; ?>);' class='square-content' alt='<?php $statut->media_attachments[0]->description; ?>'></div>
<div style='background-image: url(<?php echo $attachment->preview_url; ?>);' class='square-content' alt='<?php $attachment->description; ?>'></div>
<div class="info-text-overlay"></div>
</div>
</a><?php
elseif($statut->media_attachments[0]->type === 'video'):
echo "<video src=" . $attachment->url . " controls poster='" . $statut->media_attachments[0]->preview_url . "' class='media-gallery__item' alt=" . $statut->media_attachments[0]->description . ">";
endif; ?>
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; ?>">
<?php endif; ?>
</article>
<?php } ?>
</div>
</div>
<div class="pixelfed-footer card-footer bg-white">
<div class="text-center mb-0">
<a href="<?php echo $status[0]->account->url; ?>" class="font-weight-bold" target="_blank" rel="noreferrer noopener"><?php _e('View More Posts', 'fediembedi'); ?></a>
<a href="<?php echo $account->url; ?>" class="font-weight-bold" target="_blank" rel="noreferrer noopener"><?php _e('View More Posts', 'fediembedi'); ?></a>
</div>
</div>
</div>
</div>
</div>
<?php