Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 60c0a97

Browse files
committed
Fix phpcs issues
1 parent 51083ab commit 60c0a97

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

admin/rt-retranscode-admin.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function add_media_row_action( $actions, $post ) {
181181
return $actions;
182182
}
183183

184-
$actions = ( ! empty( $actions ) && is_array( $actions ) ) ? $actions : [];
184+
$actions = ( ! empty( $actions ) && is_array( $actions ) ) ? $actions : array();
185185

186186
$url = wp_nonce_url( admin_url( 'admin.php?page=rt-retranscoder&goback=1&ids=' . $post->ID ), 'rt-retranscoder' );
187187

@@ -617,16 +617,15 @@ public function ajax_process_retranscode_request() {
617617

618618
$media = get_post( $id );
619619

620-
if ( ! $media || 'attachment' !== $media->post_type || ( 'audio/' !== substr( $media->post_mime_type, 0, 6 ) && 'video/' !== substr( $media->post_mime_type, 0, 6 ) ) ) {
621-
622620
if ( ! $media || 'attachment' !== $media->post_type ||
623621
(
624622
'audio/' !== substr( $media->post_mime_type, 0, 6 ) &&
625623
'video/' !== substr( $media->post_mime_type, 0, 6 ) ||
626624
'application/pdf' !== $media->post_mime_type
627-
)
625+
)
628626
) {
629-
die( json_encode( array( 'error' => sprintf( __( 'Sending Failed: %s is an invalid media ID/type.', 'transcoder' ), esc_html( $_REQUEST['id'] ) ) ) ) );
627+
// translators: Media id of the invalid media type.
628+
die( wp_json_encode( array( 'error' => sprintf( __( 'Sending Failed: %s is an invalid media ID/type.', 'transcoder' ), esc_html( $id ) ) ) ) );
630629
}
631630

632631
if ( 'audio/mpeg' === $media->post_mime_type ) {

0 commit comments

Comments
 (0)