added variables in create_html with compact
This commit is contained in:
@@ -6,11 +6,13 @@
|
||||
#
|
||||
# https://stackoverflow.com/a/4402045/9497573
|
||||
|
||||
function create_html($files) {
|
||||
# takes two arguments :
|
||||
# a list of the html files to include in front
|
||||
# a list of variables to make available to this files
|
||||
function create_html($files, $vars) {
|
||||
$html_dir = plugin_dir_path(__DIR__).'html/';
|
||||
$template_dir = plugin_dir_path(__DIR__).'html/templates/';
|
||||
|
||||
$names = ["hugo", "camille"];
|
||||
extract($vars);
|
||||
|
||||
ob_start();
|
||||
foreach($files as $file) {
|
||||
|
||||
Reference in New Issue
Block a user