We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5083192 commit a3ec835Copy full SHA for a3ec835
src/compatibility/blocksy/index.php
@@ -112,10 +112,11 @@ function( $file ) {
112
113
foreach ( $blocksy_static_files as $file ) {
114
if ( isset( $file['url'] ) ) {
115
- $file_url = get_template_directory_uri() . $file['url'];
116
- $response = wp_remote_get( $file_url );
117
- if ( ! is_wp_error( $response ) ) {
118
- $styles .= wp_remote_retrieve_body( $response );
+ $file_path = get_template_directory() . $file['url'];
+ $mime = mime_content_type( $file_path );
+ $is_valid_mime = $mime === 'text/css' || $mime === 'text/plain';
+ if ( file_exists( $file_path ) && is_readable( $file_path ) && $is_valid_mime ) {
119
+ $styles .= file_get_contents( $file_path );
120
}
121
122
0 commit comments