Skip to content

Commit

Permalink
Fixed Mastodon embeds.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbohacek committed Feb 20, 2023
1 parent 1258750 commit b33b264
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/post-types/bots.php
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,9 @@ function save_meta( $post_id ) {
update_post_meta($post_id, 'output_archive_filename', $_POST['output-archive-filename']);
update_post_meta($post_id, 'output_archive_date', $_POST['output-archive-date']);




if ($_POST['bot_tweets']){
$bot_tweets = explode("\n", str_replace("\r", "", $_POST['bot_tweets']));
$twitter_oembed = 'https://publish.twitter.com/oembed?url=';
Expand Down Expand Up @@ -702,7 +705,6 @@ function save_meta( $post_id ) {
global $helpers;
if ( $helpers->is_mastodon_instance($tweet_url) ){
$bot_tweets_html .= '<blockquote><iframe src="' . $tweet_url . '/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400"></iframe></blockquote>';
break;
}
}
}
Expand Down

0 comments on commit b33b264

Please sign in to comment.