From cf83bd7ef780a2a5a90a81ff9d20ed63907d6c3a Mon Sep 17 00:00:00 2001 From: xZero707 Date: Tue, 7 Oct 2025 22:01:33 +0200 Subject: [PATCH] Add check for theme's style.css file --- src/wp-utils/wp-theme | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wp-utils/wp-theme b/src/wp-utils/wp-theme index ff0f26a..1c5fee7 100755 --- a/src/wp-utils/wp-theme +++ b/src/wp-utils/wp-theme @@ -48,11 +48,16 @@ check() { local themeSlug="${1:?check: THEME_SLUG is required}" local themePath="${themesDir}/${themeSlug}" - # Check if theme directory exists + # Check if theme directory exists - If it doesn't we know immediately that the theme is not installed if [ ! -d "${themePath}" ]; then return 1 fi + # Check if theme style.css exists - if yes, theme is probably installed successfully + if [ -f "${themePath}/style.css" ]; then + return 0 + fi + # Check if theme theme.json exists - if yes, theme is probably installed successfully if [ -f "${themePath}/theme.json" ]; then return 0