Skip to content

Commit

Permalink
fix: adds message when image attachment is added to rt_media shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathan-Amaankhan committed Feb 2, 2023
1 parent 7c7c5d0 commit 2d396b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions admin/rt-transcoder-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function rt_media_shortcode( $attrs, $content = '' ) {
}

$mime_type = explode( '/', $type );
$media_url = '';

if ( 'video' === $mime_type[0] ) {

Expand Down Expand Up @@ -81,6 +82,10 @@ function rt_media_shortcode( $attrs, $content = '' ) {

$content = do_shortcode( "[audio {$audio_shortcode_attributes}]" );

} elseif ( 'image' === $mime_type[0] ) {

$content = '<p>' . esc_html__( 'Image attachments are not handled by Transcoder plugin.', 'transcoder' ) . '</p>';

}

if ( is_file_being_transcoded( $attachment_id ) ) {
Expand Down

0 comments on commit 2d396b3

Please sign in to comment.