Skip to content

Commit

Permalink
Merge pull request #259 from rtCamp/fix/shortcode-rt_media
Browse files Browse the repository at this point in the history
GH-139: [rt_media attachment_id=XX] short does not work [Develop]
  • Loading branch information
Pathan-Amaankhan authored Feb 3, 2023
2 parents a00ada7 + 2d396b3 commit 3089c59
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 3089c59

Please sign in to comment.