From add465084091404a68a1118f3879c59f5d7f5307 Mon Sep 17 00:00:00 2001 From: haakel Date: Wed, 12 Jun 2024 15:57:38 +0330 Subject: [PATCH] ADD loader .php --- audio-diary.php | 61 ++++++++++++++++++++++++++ classes/class_Audio_diary_loader.php | 64 ++++++++++++++++++++++++++++ t.php | 0 3 files changed, 125 insertions(+) create mode 100644 audio-diary.php create mode 100644 classes/class_Audio_diary_loader.php delete mode 100644 t.php diff --git a/audio-diary.php b/audio-diary.php new file mode 100644 index 0000000..9a120b9 --- /dev/null +++ b/audio-diary.php @@ -0,0 +1,61 @@ +define_constants(); + $this->Audio_diary_loader(); + } + public function define_constants() { + + /** + * Defines all constants + * + */ + define( 'AUDIO_DIARY_VERSION', '1.0.0' ); + define( 'AUDIO_DIARY_FILE', __FILE__ ); + define( 'AUDIO_DIARY_PATH', plugin_dir_path( AUDIO_DIARY_FILE ) ); + define( 'AUDIO_DIARY_BASE', plugin_basename( AUDIO_DIARY_FILE ) ); + define( 'AUDIO_DIARY_SLUG', 'Audio_diary_settings' ); + define( 'AUDIO_DIARY_SETTINGS_LINK', admin_url( 'admin.php?page=' . AUDIO_DIARY_SLUG ) ); + define( 'AUDIO_DIARY_CLASSES_PATH', AUDIO_DIARY_PATH . 'classes/' ); + define( 'AUDIO_DIARY_IMAGES', AUDIO_DIARY_PATH . 'build/images' ); + define( 'AUDIO_DIARY_MODULES_PATH', AUDIO_DIARY_PATH . 'modules/' ); + define( 'AUDIO_DIARY_URL', plugins_url( '/', AUDIO_DIARY_FILE ) ); + } + /** + * Require loader Audio diary class. + * + * @return void + */ + public function Audio_diary_loader() { + require AUDIO_DIARY_CLASSES_PATH .'class_Audio_diary_loader.php'; + } +} + +Audio_diary::get_instance(); \ No newline at end of file diff --git a/classes/class_Audio_diary_loader.php b/classes/class_Audio_diary_loader.php new file mode 100644 index 0000000..fe2b7c4 --- /dev/null +++ b/classes/class_Audio_diary_loader.php @@ -0,0 +1,64 @@ +load_dependencies(); + } + /** + * Load the required dependencies for this plugin. + * + * @since 1.0.0 + * @access private + */ + private function load_dependencies() { + + require_once AUDIO_DIARY_CLASSES_PATH . ''; + require_once AUDIO_DIARY_CLASSES_PATH . ''; + + // The class responsible for the settings page + require_once AUDIO_DIARY_CLASSES_PATH . ''; + + // The class responsible for defining main options of the plugin. + require_once AUDIO_DIARY_CLASSES_PATH . ''; + + // The class responsible for defining REST Routs API of the plugin. + require_once AUDIO_DIARY_CLASSES_PATH . ''; + + // The class responsible for defining all actions for edd. + + require_once AUDIO_DIARY_MODULES_PATH . ''; +} + +} + +Audio_Diary_loader::get_instance(); \ No newline at end of file diff --git a/t.php b/t.php deleted file mode 100644 index e69de29..0000000