From 88c4b1c39e224a3d4a40a499bbd0deb8fe066345 Mon Sep 17 00:00:00 2001 From: Jason Crist Date: Thu, 16 May 2024 16:59:59 -0400 Subject: [PATCH] Add screenshot to valid theme properties during sanitization (#643) --- includes/class-create-block-theme-api.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/class-create-block-theme-api.php b/includes/class-create-block-theme-api.php index 7af9d3b7..b49623a1 100644 --- a/includes/class-create-block-theme-api.php +++ b/includes/class-create-block-theme-api.php @@ -490,6 +490,7 @@ private function sanitize_theme_data( $theme ) { $sanitized_theme['tags_custom'] = sanitize_text_field( $theme['tags_custom'] ?? '' ); $sanitized_theme['subfolder'] = sanitize_text_field( $theme['subfolder'] ?? '' ); $sanitized_theme['version'] = sanitize_text_field( $theme['version'] ?? '' ); + $sanitized_theme['screenshot'] = sanitize_text_field( $theme['screenshot'] ?? '' ); $sanitized_theme['recommended_plugins'] = sanitize_textarea_field( $theme['recommended_plugins'] ?? '' ); $sanitized_theme['template'] = ''; $sanitized_theme['slug'] = sanitize_title( $theme['name'] );