Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions admin/rt-retranscode-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,29 @@ public function retranscode_interface() {
}
} else {
add_filter( 'posts_where', array( $this, 'add_search_mime_types' ) );
$query = new WP_Query( array( 'post_type' => 'attachments' ) );
$query = new WP_Query(
array(
'post_type' => 'attachment',
'post_status' => 'any',
)
);
$media = $query->get_posts();
remove_filter( 'posts_where', array( $this, 'add_search_mime_types' ) );
if ( empty( $media ) || is_wp_error( $media ) ) {

// translators: Link to the media page.
echo ' <p>' . sprintf( esc_html__( "Unable to find any media. Are you sure <a href='%s'>some exist</a>?", 'transcoder' ), esc_url( admin_url( 'upload.php' ) ) ) . '</p></div>';
echo sprintf(
'<p>' .
wp_kses(
// Translators: %s is a link to media page.
__( 'Unable to find media. Are you sure <a href="%s">some exists</a>?', 'transcoder' ),
array(
'a' => array( 'href' => array() ),
)
)
. '</p>',
esc_url( admin_url( 'upload.php' ) )
);

return;
}

Expand Down