now using wp_localize instead of wp_add_inline
This commit is contained in:
@@ -30,6 +30,8 @@ include_once(PLUGIN_DIR . '/php/utils/console_log.php');
|
||||
include_once(PLUGIN_DIR . '/php/utils/add_to_front.php');
|
||||
include_once(PLUGIN_DIR . '/php/utils/create_html.php');
|
||||
|
||||
include_once(PLUGIN_DIR . '/php/menu/menu.php');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,16 +43,14 @@ function main_shortcode() {
|
||||
|
||||
add_files_to_front( array(
|
||||
"mystyle.css",
|
||||
"myscript.js",
|
||||
"init.js",
|
||||
"myscript2.js",
|
||||
"myscript3.js",
|
||||
));
|
||||
|
||||
|
||||
$myvar_1 = "I am one";
|
||||
$myvar_2 = "I am two";
|
||||
# compact creates an array containing the variables and their value
|
||||
# as key => value
|
||||
# from an array of variables names as strings
|
||||
add_var_to_front( compact(
|
||||
"myvar_1",
|
||||
"myvar_2",
|
||||
|
||||
Reference in New Issue
Block a user