- added const dir path and url

- better file organisation
This commit is contained in:
asus
2024-02-09 15:27:38 +01:00
parent 0c0b406de0
commit 35e851cf11
9 changed files with 37 additions and 24 deletions

View File

@@ -9,14 +9,15 @@ Author URI:
*/
/*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
globale variable to desable server side
console_log all at once
plugin dir root
*/
define( 'PLUGIN_DIR', plugin_dir_path(__FILE__) );
define( 'PLUGIN_URL', plugin_dir_url(__FILE__) );
$CONSOLE_OFF = true;
$CONSOLE_OFF = false;
@@ -24,10 +25,10 @@ $CONSOLE_OFF = false;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
inclusions
*/
include_once(dirname(__FILE__) . '/utils/console_log.php');
include_once(dirname(__FILE__) . '/utils/add_to_front.php');
include_once(dirname(__FILE__) . '/utils/create_html.php');
include_once(PLUGIN_DIR . '/php/utils/globals.php');
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');
@@ -36,7 +37,6 @@ include_once(dirname(__FILE__) . '/utils/create_html.php');
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
plugin shortcode
*/
function main_shortcode() {
add_files_to_front( array(
@@ -75,11 +75,12 @@ function main_shortcode() {
add_shortcode('wp_model_plugin', 'main_shortcode');
/*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
menu plugin
*/
function plugin_menu() {
add_menu_page(
'wp model plugin', // webpage title