This commit is contained in:
2025-06-14 00:37:12 +01:00
parent 55c20df3b5
commit b21a0f03aa
4 changed files with 24 additions and 2 deletions

View File

@@ -6,6 +6,10 @@ Small WordPress plugin to consume an SpaceAPI endpoint and indicate on the WordP
## Usage ## Usage
### WordPress Editor Block (Gutenberg)
You can use the `Space Status` block in the WordPress editor to display the status of the SpaceAPI endpoint.
### Shortcode ### Shortcode
You can use the shortcode `[space_status]` to display the status of the SpaceAPI endpoint on your WordPress site. You can use the shortcode `[space_status]` to display the status of the SpaceAPI endpoint on your WordPress site.
@@ -13,3 +17,8 @@ You can use the shortcode `[space_status]` to display the status of the SpaceAPI
### Widget ### Widget
You can also use the widget `SpaceAPI Status` to display the status of the SpaceAPI endpoint in your WordPress sidebar or footer. You can also use the widget `SpaceAPI Status` to display the status of the SpaceAPI endpoint in your WordPress sidebar or footer.
## Changes
### 0.4.x
- Added WordPress Editor Block (Gutenberg) support

View File

@@ -0,0 +1,7 @@
/* Editor-only: make the pill obvious & easy to select */
.wp-block-wp-spaceapi-consumer-space-status {
display: inline-block;
padding: 4px 8px;
border: 1px dashed var(--wp-admin-theme-color, #007cba);
border-radius: 9999px;
}

View File

@@ -1 +1 @@
@import url('../wp-spaceapi-consumer-style.css'); @import url('../../wp-spaceapi-consumer-style.css');

View File

@@ -4,7 +4,7 @@
* Plugin Slug: wp-spaceapi-consumer * Plugin Slug: wp-spaceapi-consumer
* Plugin URI: https://gitea.alluna.pt/jfig/wp-spaceapi-consumer * Plugin URI: https://gitea.alluna.pt/jfig/wp-spaceapi-consumer
* Description: WordPress plugin to consume a SpaceAPI endpoint and indicate if the Space is Open or Closed * Description: WordPress plugin to consume a SpaceAPI endpoint and indicate if the Space is Open or Closed
* Version: 0.3.0 * Version: 0.4.0
* Author: Joao Figueiredo, LCD Porto Team, ChatGPT o3 * Author: Joao Figueiredo, LCD Porto Team, ChatGPT o3
* Author URI: https://lcdporto.org * Author URI: https://lcdporto.org
* License: MIT * License: MIT
@@ -167,4 +167,10 @@ if ( defined( 'WP_CLI' ) && WP_CLI ) {
} ); } );
} }
// Gutenberg block support (dynamic Space Status block)
if ( function_exists( 'register_block_type' ) ) {
require_once plugin_dir_path( __FILE__ ) . 'blocks-register.php';
}
// End of file // End of file