made a class version of plugin_tools
This commit is contained in:
@@ -8,6 +8,20 @@ Version: 1.1.0
|
||||
Author URI:
|
||||
*/
|
||||
|
||||
/*
|
||||
5.5 . 5.48
|
||||
59 . 58.99
|
||||
50.6 . 50.58
|
||||
38.5 . 38.53
|
||||
99.8 . 99.84
|
||||
25.2 . 25.17
|
||||
131.6 . 135
|
||||
63.7 . 63.68
|
||||
85 . 85.05
|
||||
50.2 . 50.17
|
||||
41.4 . 41.43
|
||||
18.8 . 18.82
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +32,8 @@ plugin dir root
|
||||
define( 'FIPFCARD_PLUGIN_DIR', plugin_dir_path(__FILE__) );
|
||||
define( 'FIPFCARD_PLUGIN_URL', plugin_dir_url(__FILE__) );
|
||||
|
||||
|
||||
|
||||
include_once( plugin_dir_path(__FILE__) . '/php/utils/plugin_tools.php');
|
||||
PLGNTOOLS::set_root_dir( plugin_dir_path(__FILE__), plugin_dir_url(__FILE__) );
|
||||
|
||||
/*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
@@ -41,34 +55,63 @@ plugin shortcode
|
||||
*/
|
||||
function fipfcard_main_shortcode() {
|
||||
|
||||
fipfcard_add_files_to_front( array(
|
||||
"example_style.css",
|
||||
"example_init.js",
|
||||
"example_script2.js",
|
||||
"example_script3.js",
|
||||
));
|
||||
$fipfcard_tools = new PLGNTOOLS();
|
||||
$test_path_plgntools = $fipfcard_tools->get_path();
|
||||
$test_url_plgntools = $fipfcard_tools->get_url();
|
||||
error_log("-------------");
|
||||
error_log($test_path_plgntools);
|
||||
error_log($test_url_plgntools);
|
||||
|
||||
// fipfcard_add_files_to_front( array(
|
||||
// "example_style.css",
|
||||
// "example_init.js",
|
||||
// "example_script2.js",
|
||||
// "example_script3.js",
|
||||
// ));
|
||||
|
||||
$fipfcard_tools->add_files_to_front( array(
|
||||
"example_style.css",
|
||||
"example_init.js",
|
||||
"example_script2.js",
|
||||
"example_script3.js",
|
||||
));
|
||||
|
||||
$myvar_1 = "I am one";
|
||||
$myvar_2 = "I am two";
|
||||
fipfcard_add_var_to_front( compact(
|
||||
"myvar_1",
|
||||
"myvar_2",
|
||||
));
|
||||
// fipfcard_add_var_to_front( compact(
|
||||
// "myvar_1",
|
||||
// "myvar_2",
|
||||
// ));
|
||||
|
||||
$fipfcard_tools->add_var_to_front( compact(
|
||||
"myvar_1",
|
||||
"myvar_2",
|
||||
));
|
||||
|
||||
|
||||
$names = ["hugo", "camille"];
|
||||
$ages = ["13", "34", "56"];
|
||||
$html_front = fipfcard_create_html(
|
||||
array(
|
||||
"example_index.html",
|
||||
"example_index2.html",
|
||||
),
|
||||
compact(
|
||||
"names",
|
||||
"ages",
|
||||
)
|
||||
);
|
||||
// $html_front = fipfcard_create_html(
|
||||
// array(
|
||||
// "example_index.html",
|
||||
// "example_index2.html",
|
||||
// ),
|
||||
// compact(
|
||||
// "names",
|
||||
// "ages",
|
||||
// )
|
||||
// );
|
||||
|
||||
$html_front = $fipfcard_tools->create_html(
|
||||
array(
|
||||
"example_index.html",
|
||||
"example_index2.html",
|
||||
),
|
||||
compact(
|
||||
"names",
|
||||
"ages",
|
||||
)
|
||||
);
|
||||
|
||||
return $html_front;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user