{"id":34102,"date":"2015-01-22T01:03:45","date_gmt":"2015-01-22T01:03:45","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/lastfm-played-for-wp\/"},"modified":"2025-11-10T17:35:34","modified_gmt":"2025-11-10T17:35:34","slug":"lastfm-played-for-wp","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/lastfm-played-for-wp\/","author":13637777,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"trunk","tested":"6.7.5","requires":"6.0","requires_php":"8.0","requires_plugins":null,"header_name":"Last.FM Recently Played for WordPress","header_author":"KOMMERS GmbH","header_description":"","assets_banners_color":"","last_updated":"2025-11-10 17:35:34","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/kommers.io","header_author_uri":"https:\/\/kommers.io","rating":5,"author_block_rating":0,"active_installs":100,"downloads":4883,"num_ratings":4,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"mangorausch","date":"2025-11-10 17:20:52"},"1.0.1":{"tag":"1.0.1","author":"mangorausch","date":"2025-11-10 17:27:08"},"1.1.0":{"tag":"1.1.0","author":"mangorausch","date":"2025-11-10 17:35:34"}},"upgrade_notice":{"1.0.1":"<p>Critical fix: Restores widget compatibility. If you updated to 1.0.0 and lost your widgets, please update to 1.0.1 and re-add them.<\/p>","1.0.0":"<p>Major security and modernization update! The plugin now works immediately with a default API key. For optimal performance, visit Settings &gt; Last.FM Settings to add your own free API key (optional but recommended).<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":4},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3393085,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3393085,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3393085,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"Widget displaying recent tracks in the sidebar","2":"Settings page for configuring your Last.FM API key","3":"Widget configuration panel"}},"plugin_section":[],"plugin_tags":[1679,218,250492,39661,162],"plugin_category":[43,50],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-34102","plugin","type-plugin","status-closed","hentry","plugin_tags-last-fm","plugin_tags-music","plugin_tags-recently-played","plugin_tags-scrobble","plugin_tags-widget","plugin_category-customization","plugin_category-media","plugin_committers-mangorausch"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/lastfm-played-for-wp.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/lastfm-played-for-wp\/assets\/screenshot-1.png?rev=3393085","caption":"Widget displaying recent tracks in the sidebar"}],"raw_content":"<!--section=description-->\n<p>Last.FM Recently Played is a modern, secure WordPress plugin that displays your recently played tracks from Last.FM in a beautiful widget.<\/p>\n\n<p><strong>Key Features:<\/strong><\/p>\n\n<ul>\n<li>\ud83c\udfb5 Display recent Last.FM scrobbles in a widget, shortcode, or template function<\/li>\n<li>\ud83d\udcdd <strong>Shortcode<\/strong>: Use <code>[lastfm_tracks user=\"username\"]<\/code> in posts\/pages<\/li>\n<li>\ud83c\udfa8 <strong>Template Function<\/strong>: Use <code>lastfm_display_tracks()<\/code> in theme files<\/li>\n<li>\ud83d\udd12 Secure API key storage in WordPress settings<\/li>\n<li>\u26a1 Built-in caching for optimal performance<\/li>\n<li>\ud83d\udcf1 Responsive design with mobile support<\/li>\n<li>\ud83c\udfa8 Clean, customizable CSS<\/li>\n<li>\ud83d\udee1\ufe0f Modern security standards (proper escaping, validation, nonces)<\/li>\n<li>\ud83d\ude80 PHP 8.0+ compatible with strict types<\/li>\n<li>\ud83c\udf10 Translation ready with proper text domains<\/li>\n<li>\u267f Accessible markup with proper attributes<\/li>\n<\/ul>\n\n<p><strong>Requirements:<\/strong><\/p>\n\n<ul>\n<li>A Last.FM account with scrobbling enabled<\/li>\n<li>A Last.FM API key is optional - plugin includes a default shared key, but getting your own is recommended for better performance<\/li>\n<\/ul>\n\n<p><strong>Privacy &amp; Security:<\/strong><\/p>\n\n<ul>\n<li>Your API key is stored securely in WordPress options<\/li>\n<li>All API requests use HTTPS<\/li>\n<li>Output is properly sanitized to prevent XSS attacks<\/li>\n<li>Transient caching reduces API calls and improves performance<\/li>\n<\/ul>\n\n<h3>Third-Party Services<\/h3>\n\n<p>This plugin connects to the Last.FM API to retrieve your music listening data:\n* Service: Last.FM Web Services API\n* API Documentation: https:\/\/www.last.fm\/api\n* Terms of Service: https:\/\/www.last.fm\/api\/tos\n* Privacy Policy: https:\/\/www.last.fm\/legal\/privacy<\/p>\n\n<p>Data sent to Last.FM: Your Last.FM username (configured in widget settings)\nData received: Your user profile information and recently played tracks<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to <code>\/wp-content\/plugins\/lastfm-played-wp\/<\/code> or install via the WordPress admin panel<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>(Optional) Go to Settings &gt; Last.FM Settings to configure your own API key for better performance<\/li>\n<\/ol>\n\n<p><strong>Using the Widget:<\/strong>\n1. Go to Appearance &gt; Widgets\n2. Add the \"Last.FM Recently Played\" widget to your sidebar\n3. Configure with your Last.FM username and preferences<\/p>\n\n<p><strong>Using Shortcode:<\/strong>\nAdd <code>[lastfm_tracks user=\"your_username\"]<\/code> to any post or page<\/p>\n\n<p><strong>Using Template Function:<\/strong>\nAdd <code>&lt;?php lastfm_display_tracks('your_username'); ?&gt;<\/code> to your theme files<\/p>\n\n<p><strong>Getting Your Own API Key (Optional but Recommended):<\/strong><\/p>\n\n<p>The plugin works out of the box with a default shared API key. However, for better performance and to avoid potential rate limits, we recommend getting your own free API key:<\/p>\n\n<ol>\n<li>Visit https:\/\/www.last.fm\/api\/account\/create<\/li>\n<li>Fill in the application form (use your website URL)<\/li>\n<li>Copy your API Key<\/li>\n<li>Paste it in Settings &gt; Last.FM Settings<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='do%20i%20need%20my%20own%20api%20key%3F'><h3>Do I need my own API key?<\/h3><\/dt>\n<dd><p>No! The plugin works immediately with a default shared API key. However, getting your own free API key is recommended for:\n* Better performance\n* Higher rate limits\n* Avoiding potential throttling from shared key usage<\/p>\n\n<p>Visit https:\/\/www.last.fm\/api\/account\/create to create a free API account. You'll receive an API key immediately after registration.<\/p><\/dd>\n<dt id='how%20often%20does%20the%20widget%20update%3F'><h3>How often does the widget update?<\/h3><\/dt>\n<dd><p>The widget caches user data for 1 hour and track data for 5 minutes to improve performance and respect Last.FM's API rate limits. When a track is currently playing, it will show \"Now playing...\" in real-time.<\/p><\/dd>\n<dt id='how%20do%20i%20use%20the%20shortcode%3F'><h3>How do I use the shortcode?<\/h3><\/dt>\n<dd><p>Add this to any post or page:\n    [lastfm_tracks user=\"your_username\"]<\/p>\n\n<p>Optional parameters:\n* <code>count<\/code> - Number of tracks (default: 5, max: 50)\n* <code>showuser<\/code> - Show user info (default: true)<\/p>\n\n<p>Examples:\n* <code>[lastfm_tracks user=\"johndoe\" count=\"10\"]<\/code>\n* <code>[lastfm_tracks user=\"johndoe\" count=\"3\" showuser=\"false\"]<\/code><\/p><\/dd>\n<dt id='how%20do%20i%20use%20the%20template%20function%3F'><h3>How do I use the template function?<\/h3><\/dt>\n<dd><p>Add this to your theme files (header.php, sidebar.php, etc.):<\/p>\n\n<pre><code>&lt;?php if ( function_exists( 'lastfm_display_tracks' ) ) {\n    lastfm_display_tracks( 'your_username', 5, true );\n} ?&gt;\n<\/code><\/pre>\n\n<p>Parameters:\n1. Username (required)\n2. Number of tracks (optional, default: 5)\n3. Show user info (optional, default: false)<\/p><\/dd>\n<dt id='can%20i%20hide%20the%20user%20profile%20information%3F'><h3>Can I hide the user profile information?<\/h3><\/dt>\n<dd><p>Yes! In the widget settings, simply uncheck \"Show user profile information\" to display only the track list without the user's profile picture, name, and play count.<\/p>\n\n<p>For shortcode: Use <code>showuser=\"false\"<\/code>\nFor template function: Set third parameter to <code>false<\/code><\/p><\/dd>\n<dt id='can%20i%20customize%20the%20styling%3F'><h3>Can I customize the styling?<\/h3><\/dt>\n<dd><p>Yes! The plugin uses standard CSS classes that you can override in your theme's CSS:\n* <code>.lastfm-row<\/code> - Container for rows\n* <code>.lastfm-user<\/code> - User info section\n* <code>.lastfm-tracklist<\/code> - Track list items\n* <code>.lastfm-col-*<\/code> - Column classes<\/p><\/dd>\n<dt id='is%20this%20plugin%20secure%3F'><h3>Is this plugin secure?<\/h3><\/dt>\n<dd><p>Yes! Version 1.0.0 includes major security improvements:\n* API keys stored securely in WordPress options (not hardcoded)\n* All output properly escaped to prevent XSS\n* Input validation and sanitization\n* Uses wp_remote_get() instead of insecure file functions\n* HTTPS-only API calls\n* Nonce verification for settings<\/p><\/dd>\n<dt id='does%20this%20work%20with%20php%208.x%3F'><h3>Does this work with PHP 8.x?<\/h3><\/dt>\n<dd><p>Yes! The plugin is fully compatible with PHP 8.0+ and uses modern PHP features like strict types and type hints.<\/p><\/dd>\n<dt id='how%20do%20i%20report%20bugs%20or%20request%20features%3F'><h3>How do I report bugs or request features?<\/h3><\/dt>\n<dd><p>Please use the GitHub issue tracker:\nhttps:\/\/github.com\/kommers-io\/LastFM-Played-for-Wordpress\/issues<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0 - 2025-11-10<\/h4>\n\n<p><strong>New Feature: Shortcode and Template Function Support<\/strong><\/p>\n\n<ul>\n<li>Added: <code>[lastfm_tracks]<\/code> shortcode for use in posts and pages<\/li>\n<li>Added: <code>lastfm_display_tracks()<\/code> template function for theme integration<\/li>\n<li>Added: <code>lastfm_get_tracks()<\/code> helper function that returns HTML<\/li>\n<li>Feature request fulfilled from 2016 - display tracks without widgets<\/li>\n<li>All functions support custom track count and show\/hide user options<\/li>\n<\/ul>\n\n<h4>1.0.1 - 2025-11-10<\/h4>\n\n<p><strong>Critical fix for widget compatibility<\/strong><\/p>\n\n<ul>\n<li>Fixed: Restored original widget ID to prevent widgets from being removed on update<\/li>\n<li>This fixes the issue where widgets disappeared after updating from 0.99.x to 1.0.0<\/li>\n<\/ul>\n\n<h4>1.0.0 - 2025-11-10<\/h4>\n\n<p><strong>Major security and modernization update<\/strong><\/p>\n\n<ul>\n<li><strong>Easy Setup:<\/strong>\n\n<ul>\n<li>Includes default API key - works immediately after installation<\/li>\n<li>Optional custom API key support for better performance<\/li>\n<li>Settings page for easy configuration<\/li>\n<\/ul><\/li>\n<li><strong>New Features:<\/strong>\n\n<ul>\n<li>Option to hide user profile information (show tracks only)<\/li>\n<\/ul><\/li>\n<li><strong>Security fixes:<\/strong>\n\n<ul>\n<li>API key management with secure settings page<\/li>\n<li>Changed all API calls from HTTP to HTTPS<\/li>\n<li>Added proper output escaping to prevent XSS vulnerabilities<\/li>\n<li>Replaced @simplexml_load_file with secure wp_remote_get()<\/li>\n<li>Added input validation and sanitization<\/li>\n<li>Implemented nonce verification for settings<\/li>\n<\/ul><\/li>\n<li><strong>Performance improvements:<\/strong>\n\n<ul>\n<li>Added transient caching (1 hour for user data, 5 minutes for tracks)<\/li>\n<li>Reduced API calls significantly<\/li>\n<\/ul><\/li>\n<li><strong>Modern standards:<\/strong>\n\n<ul>\n<li>Updated to PHP 8.0+ with strict types and type hints<\/li>\n<li>Updated to WordPress 6.0+ standards<\/li>\n<li>Proper text domain for translations<\/li>\n<li>Added proper error handling<\/li>\n<li>Removed deprecated code<\/li>\n<\/ul><\/li>\n<li><strong>UI\/UX improvements:<\/strong>\n\n<ul>\n<li>Modern, polished design with gradient backgrounds<\/li>\n<li>Smooth hover effects and transitions<\/li>\n<li>Card-based layout with shadows and borders<\/li>\n<li>Dark mode support for modern browsers<\/li>\n<li>Staggered fade-in animations for tracks<\/li>\n<li>System font stack for better performance<\/li>\n<li>Last.FM brand colors (#d51007)<\/li>\n<li>Added admin settings page with proper capability checks<\/li>\n<li>Added settings link on plugins page<\/li>\n<li>Better error messages for administrators<\/li>\n<li>Improved responsive design<\/li>\n<li>Added loading=\"lazy\" for images<\/li>\n<\/ul><\/li>\n<li><strong>Code quality:<\/strong>\n\n<ul>\n<li>Follows WordPress Coding Standards<\/li>\n<li>Comprehensive PHPDoc comments<\/li>\n<li>Modern CSS (removed vendor prefixes)<\/li>\n<li>Added uninstall.php for proper cleanup<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h4>0.99.2<\/h4>\n\n<ul>\n<li>Previous release<\/li>\n<\/ul>","raw_excerpt":"Display your recently played tracks from Last.FM in a clean, responsive widget with caching and modern security standards.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/34102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=34102"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mangorausch"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=34102"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=34102"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=34102"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=34102"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=34102"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=34102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}