Skip to content

Commit

Permalink
Update wptt-webfont-loader.php
Browse files Browse the repository at this point in the history
`file_get_contents()` is not allowed in themes
  • Loading branch information
aristath committed Oct 3, 2020
1 parent 7abf591 commit 7243420
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wptt-webfont-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,10 @@ public function get_local_stylesheet_contents() {
return false;
}
}

return file_get_contents( $local_path ); // phpcs:ignore WordPress.WP.AlternativeFunctions

ob_start();
include $local_path;
return ob_get_clean();
}

/**
Expand Down

0 comments on commit 7243420

Please sign in to comment.