admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'fedistream_library' ), 'i18n' => array( 'loading' => __( 'Loading...', 'wp-fedistream' ), 'noFavorites' => __( 'No favorites yet.', 'wp-fedistream' ), 'noArtists' => __( 'Not following any artists yet.', 'wp-fedistream' ), 'noHistory' => __( 'No listening history.', 'wp-fedistream' ), 'confirmClear' => __( 'Are you sure you want to clear your listening history?', 'wp-fedistream' ), 'historyCleared' => __( 'History cleared.', 'wp-fedistream' ), 'error' => __( 'An error occurred. Please try again.', 'wp-fedistream' ), ), ) ); } /** * Render the library shortcode. * * @param array $atts Shortcode attributes. * @return string */ public function render_library_shortcode( array $atts = array() ): string { $atts = shortcode_atts( array( 'tab' => 'favorites', ), $atts, 'fedistream_library' ); if ( ! is_user_logged_in() ) { return $this->render_login_required(); } $user_id = get_current_user_id(); // Get counts for tabs. $favorite_count = Library::get_favorite_count( $user_id ); $following_count = Library::get_following_count( $user_id ); ob_start(); ?>

<?php echo esc_attr( $item['title'] ); ?>

<?php echo esc_attr( $artist['name'] ); ?>

<?php echo esc_attr( $track['title'] ); ?>