Linux 软件免费装
Banner图

Now Playing Widget for Spotify

开发者 tuliocareli
更新时间 2026年11月26日 20:38
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

music widget spotify now playing glassmorphism

下载

1.1.0

详情介绍:

Instead of relying on heavy third-party embeds or exposing Spotify API keys to visitors' browsers (a critical security risk), this plugin provides a clean, native, and highly performant way to show your website visitors what you are currently listening to on Spotify. The Now Playing Widget for Spotify was built strictly according to WordPress Coding Standards, optimal front-end performance, and frictionless UX. It presents a modern, floating Glassmorphism UI using the [npwfs_now_playing] shortcode. Features

安装:

  1. Upload the plugin folder now-playing-widget-for-spotify to your /wp-content/plugins/ directory, or install the .zip archive via Plugins > Add New > Upload Plugin.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Navigate to Settings > Now Playing for Spotify in your dashboard.
  4. Follow the 3-Step Setup:
  5. Create a free developer application in the Spotify Developer Dashboard.
  6. Copy the exact Redirect URI provided on the settings page and save it in your Spotify App settings.
  7. Paste your Client ID and Client Secret, then click Save credentials.
  8. Click the green Connect with Spotify button. Accept the prompt on Spotify's authorization screen.
  9. Place the shortcode [npwfs_now_playing] anywhere on your site (posts, pages, block themes, Elementor, or footer widget areas).
(Note: The widget stays hidden until an account is connected and a track is found, keeping your site layout clean).

屏幕截图:

  • The Spotify Connection settings tab showing the 3-step OAuth2 setup, connection status, and the [npwfs_now_playing] shortcode.
  • The Appearance & Live Preview tab with real-time interactive customization for colors, glass opacity, hover effects, album art style, border shape, and screen position.

升级注意事项:

1.1.0 Upgrades security, caching efficiency, and WordPress.org compatibility. Existing credentials will be migrated automatically.

常见问题:

Does this plugin track website visitors?

No. In strict compliance with WordPress.org Guidelines 7 & 9, this plugin does not track website visitors, does not store tracking cookies, and does not send any visitor data to Spotify or any third party. All external API requests are performed strictly server-to-server between your WordPress host and Spotify to display the site owner's playback, which is then served sanitized to visitors via a local WordPress REST endpoint.

Does this plugin slow down my site?

No. Assets (CSS/JS) are only enqueued when the shortcode is actually rendered on the current page. Track data is cached via WordPress Transients, and front-end polling is throttled and paused when the user switches tabs.

Will my Spotify credentials be exposed to visitors?

Never. All requests to the Spotify Accounts API and Web API are executed by your WordPress server in PHP. The browser only receives the public track metadata (song name, artist, cover image URL, Spotify link).

What happens when I pause my playback?

The plugin automatically detects the idle state and queries your recently played history, displaying your last track with a "Last played" label.

Can I customize the polling interval or cache duration?

Yes. You can use standard WordPress filters in your theme's functions.php:

  • add_filter('npwfs_cache_ttl', function() { return 60; }); (server cache seconds)
  • add_filter('npwfs_poll_interval', function() { return 20; }); (frontend refresh seconds)

What happens when I deactivate or delete the plugin?

Deactivation preserves your credentials so you can reactivate without repeating setup. Deleting the plugin through WordPress triggers uninstall.php, which permanently deletes all stored options and transients.

更新日志:

1.1.0 1.0.0