diff --git a/package-lock.json b/package-lock.json index 4b06417..0754b2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "spearfishing-stuff", + "name": "wespearfish", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "spearfishing-stuff", + "name": "wespearfish", "version": "1.0.0", "license": "GPL-2.0-or-later", "dependencies": { diff --git a/package.json b/package.json index 9272bb0..4f9675d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "spearfishing-stuff", + "name": "wespearfish", "version": "1.0.0", "description": "Example block scaffolded with Create Block tool.", "author": "arcangelinis", diff --git a/src/scale-section/block.json b/src/scale-section/block.json index bd10e59..9d11470 100644 --- a/src/scale-section/block.json +++ b/src/scale-section/block.json @@ -1,7 +1,7 @@ { "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, - "name": "spearfishing-stuff/scale-section", + "name": "wespearfish/scale-section", "version": "0.1.0", "title": "Scale Section", "category": "widgets", @@ -11,7 +11,7 @@ "supports": { "html": false }, - "textdomain": "spearfishing-stuff", + "textdomain": "wespearfish", "attributes": { "content": { "type": "string", diff --git a/src/scale-section/style.scss b/src/scale-section/style.scss index a0272f9..08912bb 100644 --- a/src/scale-section/style.scss +++ b/src/scale-section/style.scss @@ -1,4 +1,4 @@ -.wp-block-spearfishing-stuff-scale-section { +.wp-block-wespearfish-scale-section { display: grid; place-content: center; background-color: inherit; diff --git a/src/weather/block.json b/src/weather/block.json index e923c27..0653b6f 100644 --- a/src/weather/block.json +++ b/src/weather/block.json @@ -1,7 +1,7 @@ { "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, - "name": "spearfishing-stuff/weather", + "name": "wespearfish/weather", "version": "0.1.0", "title": "Fishing Weather", "category": "widgets", @@ -10,7 +10,7 @@ "supports": { "html": false }, - "textdomain": "spearfishing-stuff", + "textdomain": "wespearfish", "attributes": { "time": { "type": "string", diff --git a/src/weather/edit.tsx b/src/weather/edit.tsx index afeff1c..8807583 100644 --- a/src/weather/edit.tsx +++ b/src/weather/edit.tsx @@ -11,7 +11,7 @@ export default function Edit({ attributes, setAttributes }) { return ( <>
- +
diff --git a/src/weather/style.scss b/src/weather/style.scss index 62d7480..663a66f 100644 --- a/src/weather/style.scss +++ b/src/weather/style.scss @@ -1,4 +1,4 @@ -.wp-block-spearfishing-stuff-weather { +.wp-block-wespearfish-weather { margin: 20px auto; max-width: 1440px; width: 100%; diff --git a/weather-api.php b/weather-api.php index c737f05..4b8ebae 100644 --- a/weather-api.php +++ b/weather-api.php @@ -105,7 +105,7 @@ function get_current_weather_data() { $cache_key = 'spearfishing_current_weather_data'; $cached_response = wp_cache_get( $cache_key ); - if ( true ) { + if ( $cached_response ) { $current_weather_data = fetch_current_weather_data(); wp_cache_set( $cache_key, $current_weather_data, '', 600 ); diff --git a/weather-block-render.php b/weather-block-render.php index c9c8d48..4e21ae1 100644 --- a/weather-block-render.php +++ b/weather-block-render.php @@ -213,7 +213,7 @@ function render_weather_block( $block_attributes, $content ) { } return << +
$output
@@ -223,7 +223,7 @@ function render_weather_block( $block_attributes, $content ) { if ( $block_attributes['time'] === 'current' ) { return << +