diff --git a/wp'api'consumer.php b/wp'api'consumer.php deleted file mode 100644 index 5a8f8ff..0000000 --- a/wp'api'consumer.php +++ /dev/null @@ -1,47 +0,0 @@ - 4 ] ); // 4 s hard stop - $state = is_wp_error( $r ) ? '' : trim( wp_remote_retrieve_body( $r ) ); - set_transient( 'ds_state', $state, 10 ); - } - return $state; -} - -/** - * Returns a coloured dot (🟢 / 🔴) or ⚪ if the API is unreachable. - */ -function ds_render() { - $s = strtolower( ds_get_state() ); - if ( 'true' === $s ) return '🟢'; - if ( 'false' === $s ) return '🔴'; - return '⚪'; -} -add_shortcode( 'door_state', 'ds_render' ); // [door_state] - -/** - * Automatically append the indicator to a menu (optional). - * Replace 'primary' with your theme’s menu slug if different. - */ -function ds_menu_item( $items, $args ) { - if ( 'primary' === $args->theme_location ) { - $items .= '