From 676fed9f2c1886347f4d45b7220657b98eaba40c Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Mon, 23 Jun 2025 14:06:39 -0700 Subject: [PATCH] change placeholder text, updated settings page So now it just pulls a url from placeholder.co and converts it to base64, why? because it lessens client requests and makes it easier to handle in the frontend. also added notes to the settings page to explain the new functionality, with the artwork api --- nowplaying-api.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nowplaying-api.php b/nowplaying-api.php index 1e03c9a..3661f9b 100644 --- a/nowplaying-api.php +++ b/nowplaying-api.php @@ -2,7 +2,7 @@ /* Plugin Name: Apple Music Now Playing API Description: Accepts JSON now-playing updates via REST, lets user set a secure API key on the plugin page, a shortcode widget, that can be added to Footer -Version: 1.4.0 +Version: 1.4.1 Author: Sophia Atkinson */ @@ -151,11 +151,14 @@ function nowplaying_api_settings_page() } $url = esc_url(site_url("/wp-json/nowplaying/v1/update")); + $artwork_url = esc_url(site_url("/wp-json/nowplaying/v1/update/artwork")); ?>

Apple Music Now Playing API Settings

-

This is the key you will use for the web extension to communicate with this server. The POST address is:

- +

This is the key you will use for the web extension to communicate with this server. The POST addresses are:

+ Now playing Endpoint: +
+ Artwork Endpoint:
@@ -191,10 +194,11 @@ add_shortcode("now-playing-widget", function () { $art_url = plugin_dir_url(__FILE__) . "nowplaying-art.json"; ob_start(); ?> +
- Album cover + Album cover
Loading...
@@ -214,7 +218,7 @@ add_shortcode("now-playing-widget", function () { ?>