diff --git a/platforms/php/build.php b/platforms/php/build.php index 10b9f45..c3c1eb5 100644 --- a/platforms/php/build.php +++ b/platforms/php/build.php @@ -35,7 +35,7 @@ trait Custom_Handlebars { return $context; } ); - $this->add_handlebar( 'wp_kses_post', function ( $context ) { + $this->add_handlebar( 'safe_html', function ( $context ) { if ( function_exists( 'wp_kses_post' ) ) { return wp_kses_post( $context ); } @@ -91,7 +91,16 @@ class Component_Builder { $file_path_parts[] = 'php'; $file_path = join( '.', $file_path_parts ); - $t = file_put_contents( $file_path, '' ); + $comment = " +/** + * FILE INFO: + * This file was generated by LightCandy::compile function. + * The original source is the .HBS(handlebars) file that is located next to this generated PHP file. + */ + + "; + + $t = file_put_contents( $file_path, '' ); if ( $t === false ) { die( "Error: Can't generate HBS template to PHP file. Cache folder is not accessible." ); }