From 1edf291cb734f3ad504bac18fd2748d4950fd412 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 22 Dec 2022 08:23:11 -0600 Subject: [PATCH] use readfile() instead of file_get_contents(), fixes #25 --- inc/helper-functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/helper-functions.php b/inc/helper-functions.php index c9257b7..523fa77 100644 --- a/inc/helper-functions.php +++ b/inc/helper-functions.php @@ -142,7 +142,9 @@ function ea_icon( $atts = array() ) { if( ! file_exists( $icon_path ) ) return; - $icon = file_get_contents( $icon_path ); + ob_start(); + readfile( $icon_path ); + $icon = ob_get_clean(); $class = 'svg-icon'; if( !empty( $atts['class'] ) )