Merged in feature/Plugin-updates (pull request #19)
Updated plugins * Updated plugins
This commit is contained in:
@@ -216,9 +216,19 @@ class BSF_SP_Init_Blocks {
|
||||
* Get the SVG icons.
|
||||
*/
|
||||
private function get_svg_icons() {
|
||||
ob_start();
|
||||
file_get_contents( BSF_AIOSRS_PRO_DIR . 'wpsp-config/controls/WPSPIcon.json' );
|
||||
return json_decode( ob_get_clean(), true );
|
||||
|
||||
$file_path = BSF_AIOSRS_PRO_DIR . 'wpsp-config/controls/WPSPIcon.json';
|
||||
|
||||
// Check if the file exists before attempting to read it.
|
||||
if ( file_exists( $file_path ) ) {
|
||||
$file_content = file_get_contents( $file_path );
|
||||
|
||||
// Check if file_get_contents was successful.
|
||||
if ( $file_content !== false ) {
|
||||
// Parse JSON content.
|
||||
return json_decode( $file_content, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user