list_renderer = $this->get_list_renderer(); } /** * Render posts HTML using Generated_List_Renderer * * @param array $posts Array of WP_Post objects. * @return string Rendered HTML. */ public function render_posts_html( $posts ) { if ( empty( $posts ) ) { return $this->render_no_posts_message(); } ob_start(); foreach ( $posts as $post ) { $this->list_renderer->render_list_item( $post ); } return ob_get_clean(); } /** * Render no posts message * * @return string HTML for no posts message */ public function render_no_posts_message() { return '
' . esc_html__( 'No recordings match this filter.', 'accessibility-audio-tts-text-to-speech-for-articles' ) . '
'; } /** * Render pagination info * * @param int $page Current page. * @param int $total_posts Total number of posts. * @param int $per_page Posts per page. * @return string Pagination HTML. */ public function render_pagination_info( $page, $total_posts, $per_page ) { $start = ( ( $page - 1 ) * $per_page ) + 1; $end = min( $page * $per_page, $total_posts ); return sprintf( '
Showing %d-%d of %d posts
', $start, $end, $total_posts ); } /** * Render load more button * * @param bool $has_more Whether there are more posts to load. * @param int $next_page Next page number. * @return string Load more button HTML. */ public function render_load_more_button( $has_more, $next_page ) { if ( ! $has_more ) { return ''; } return sprintf( /* translators: auto */ '', $next_page ); } /** * Render posts statistics summary * * @param array $statistics Posts statistics. * @return string Statistics HTML. */ public function render_statistics_summary( $statistics ) { ob_start(); ?>
Total Generated:
Recent (24h):
Last Generated: