cleaned files by prefixing names with 'example' when not means to be used in other plugins aka not utils
This commit is contained in:
@@ -4,6 +4,6 @@
|
|||||||
<button id='test_ajax_1' name="ajax_button_1" value="2024">2024</button>
|
<button id='test_ajax_1' name="ajax_button_1" value="2024">2024</button>
|
||||||
<?php
|
<?php
|
||||||
foreach($names as $name) {
|
foreach($names as $name) {
|
||||||
include($html_dir."templates/presentation.html");
|
include($html_dir."templates/example_presentation.html");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -6,10 +6,10 @@ function wp_model_plugin_content() {
|
|||||||
console_log($first_script);
|
console_log($first_script);
|
||||||
|
|
||||||
add_files_to_front( array(
|
add_files_to_front( array(
|
||||||
"menu/menu.js",
|
"menu/example_menu.js",
|
||||||
));
|
));
|
||||||
|
|
||||||
echo create_html("menu/menu.html");
|
echo create_html("menu/example_menu.html");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -5,8 +5,11 @@
|
|||||||
/*
|
/*
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
function that add the ajax script to front
|
function that add the ajax script to front
|
||||||
no need to check if already included, because $handle is uniq
|
needs to check if already included :
|
||||||
so it will not be recincluded, the first enqueued version will be kept
|
- $handle is uniq so it will not be re-enqueued
|
||||||
|
the first enqueued version would be kept
|
||||||
|
- but the vars add to front would be added twice
|
||||||
|
leading to js syntaxe error (redeclaraiton of 'let' or 'const')
|
||||||
*/
|
*/
|
||||||
function add_ajax_post() {
|
function add_ajax_post() {
|
||||||
global $first_script;
|
global $first_script;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ 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/add_to_front.php');
|
||||||
include_once(PLUGIN_DIR . '/php/utils/create_html.php');
|
include_once(PLUGIN_DIR . '/php/utils/create_html.php');
|
||||||
|
|
||||||
include_once(PLUGIN_DIR . '/php/menu/menu.php');
|
include_once(PLUGIN_DIR . '/php/menu/example_menu.php');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -42,10 +42,10 @@ plugin shortcode
|
|||||||
function main_shortcode() {
|
function main_shortcode() {
|
||||||
|
|
||||||
add_files_to_front( array(
|
add_files_to_front( array(
|
||||||
"mystyle.css",
|
"example_style.css",
|
||||||
"init.js",
|
"example_init.js",
|
||||||
"myscript2.js",
|
"example_script2.js",
|
||||||
"myscript3.js",
|
"example_script3.js",
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
@@ -61,8 +61,8 @@ function main_shortcode() {
|
|||||||
$ages = ["13", "34", "56"];
|
$ages = ["13", "34", "56"];
|
||||||
$html_front = create_html(
|
$html_front = create_html(
|
||||||
array(
|
array(
|
||||||
"index.html",
|
"example_index.html",
|
||||||
"index2.html",
|
"example_index2.html",
|
||||||
),
|
),
|
||||||
compact(
|
compact(
|
||||||
"names",
|
"names",
|
||||||
|
|||||||
Reference in New Issue
Block a user