mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2025-12-08 01:11:33 +01:00
Add check for theme's style.css file
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user