From 2d396b320aa9b42fce63f044344805b3e6b393f9 Mon Sep 17 00:00:00 2001 From: Amaan Khan Date: Thu, 2 Feb 2023 19:15:59 +0530 Subject: [PATCH] fix: adds message when image attachment is added to rt_media shortcode --- admin/rt-transcoder-functions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/rt-transcoder-functions.php b/admin/rt-transcoder-functions.php index a14261b..59c4259 100755 --- a/admin/rt-transcoder-functions.php +++ b/admin/rt-transcoder-functions.php @@ -52,6 +52,7 @@ function rt_media_shortcode( $attrs, $content = '' ) { } $mime_type = explode( '/', $type ); + $media_url = ''; if ( 'video' === $mime_type[0] ) { @@ -81,6 +82,10 @@ function rt_media_shortcode( $attrs, $content = '' ) { $content = do_shortcode( "[audio {$audio_shortcode_attributes}]" ); + } elseif ( 'image' === $mime_type[0] ) { + + $content = '

' . esc_html__( 'Image attachments are not handled by Transcoder plugin.', 'transcoder' ) . '

'; + } if ( is_file_being_transcoded( $attachment_id ) ) {