Compare commits

...

2 Commits

2 changed files with 13 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
<?php
define( 'DSI_API_URL', 'https://nodered.jfig.net/api/v1/door-open' );
define( 'DSI_CACHE_KEY', 'dsi_door_open_status' );
define( 'DSI_API_URL', 'https://lcdporto.org/api/spaceapi' );
define( 'DSI_CACHE_KEY', 'dsi_space_api_status' );
define( 'DSI_CACHE_TTL', 10 );

View File

@@ -1,14 +1,15 @@
<?php
/**
* Plugin Name: Door Status Indicator
* Plugin URI: https://example.com/
* Description: Lightweight, dependencyfree plugin that polls a JSON endpoint (default: https://nodered.jfig.net/api/v1/door-open), caches the value for a few seconds, and shows a realtime door open/closed indicator (🟢/🔴) via the [door_status] shortcode and the Admin Bar.
* Plugin Name: WordPress SpaceAPI Consumer
* Plugin Slug: wp-spaceapi-consumer
* Plugin URI: https://gitea.alluna.pt/jfig/wp-spaceapi-consumer
* Description: Small WordPress plugin to consume an SpaceAPI endpoint and indicate on the WordPress website if the Space is Open or Closed
* Version: 1.1.1
* Author: J (ChatGPT helper)
* Author URI: https://example.com/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: door-status-indicator
* Author: Joao Figueiredo, LCD Porto Team, ChatGPT o3
* Author URI: https://lcdporto.org
* License: MIT
* License URI: https://gitea.alluna.pt/jfig/wp-spaceapi-consumer/src/branch/dev/LICENSE
* Text Domain: wp-spaceapi-consumer
*/
if ( ! defined( 'ABSPATH' ) ) {
@@ -30,8 +31,8 @@ if ( file_exists( $config_file ) ) {
}
// Fallback defaults (only if not already defined by the config file).
! defined( 'DSI_API_URL' ) && define( 'DSI_API_URL', 'https://nodered.jfig.net/api/v1/door-open' );
! defined( 'DSI_CACHE_KEY' ) && define( 'DSI_CACHE_KEY', 'dsi_door_open_status' );
! defined( 'DSI_API_URL' ) && define( 'DSI_API_URL', 'https://lcdporto.org/api/spaceapi' );
! defined( 'DSI_CACHE_KEY' ) && define( 'DSI_CACHE_KEY', 'dsi_space_api_status' );
! defined( 'DSI_CACHE_TTL' ) && define( 'DSI_CACHE_TTL', 10 ); // seconds
/*