diff --git a/src/class/dashboard/init.php b/src/class/dashboard/init.php index 19f291e..ac58fed 100644 --- a/src/class/dashboard/init.php +++ b/src/class/dashboard/init.php @@ -7,6 +7,9 @@ * @since 1.5.0 */ +require_once dirname( __FILE__, 2) . '/settings.php'; +require_once dirname( __FILE__ ) . '/subpage-main.php'; + /** * Handles the Settings interface of the Plugin. * diff --git a/src/class/dashboard/layout.php b/src/class/dashboard/layout.php index 40ce3e2..8bde0b4 100644 --- a/src/class/dashboard/layout.php +++ b/src/class/dashboard/layout.php @@ -13,6 +13,11 @@ * * @since 2.5.5 Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. */ + +require_once dirname( __FILE__, 2) . '/config.php'; +require_once dirname( __FILE__, 2) . '/convert.php'; +require_once dirname( __FILE__, 2) . '/settings.php'; +require_once dirname( __FILE__ ) . '/init.php'; /** * Layout Engine for the administration dashboard. diff --git a/src/class/dashboard/subpage-main.php b/src/class/dashboard/subpage-main.php index 9aa05ac..9d4f0b2 100644 --- a/src/class/dashboard/subpage-main.php +++ b/src/class/dashboard/subpage-main.php @@ -40,6 +40,12 @@ * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ */ + +require_once dirname( __FILE__, 2) . '/config.php'; +require_once dirname( __FILE__, 2) . '/convert.php'; +require_once dirname( __FILE__, 2) . '/settings.php'; +require_once dirname( __FILE__, 2) . '/template.php'; +require_once dirname( __FILE__ ) . '/layout.php'; /** * Displays and handles all Settings of the Plugin. diff --git a/src/class/init.php b/src/class/init.php index 57f9f71..9033738 100644 --- a/src/class/init.php +++ b/src/class/init.php @@ -6,6 +6,16 @@ * @since 1.5.0 */ +require_once dirname( __FILE__ ) . '/config.php'; +require_once dirname( __FILE__ ) . '/convert.php'; +require_once dirname( __FILE__ ) . '/hooks.php'; +require_once dirname( __FILE__ ) . '/language.php'; +require_once dirname( __FILE__ ) . '/settings.php'; +require_once dirname( __FILE__ ) . '/task.php'; +require_once dirname( __FILE__ ) . '/wysiwyg.php'; +require_once dirname( __FILE__ ) . '/dashboard/init.php'; +require_once dirname( __FILE__ ) . '/widgets/reference-container.php'; + /** * Provides an entry point to the Plugin. * diff --git a/src/class/language.php b/src/class/language.php index a972902..56696cc 100644 --- a/src/class/language.php +++ b/src/class/language.php @@ -10,6 +10,8 @@ * @since 2.1.6 Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. */ +require_once dirname( __FILE__ ) . '/config.php'; + /** * Loads text domain of current or default language for localization. * diff --git a/src/class/settings.php b/src/class/settings.php index 11575fa..62c2dfa 100644 --- a/src/class/settings.php +++ b/src/class/settings.php @@ -13,6 +13,8 @@ * @since 2.1.3 Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report. */ +require_once dirname( __FILE__ ) . '/convert.php'; + /** * Loads the settings values, sets to default values if undefined. * diff --git a/src/class/task.php b/src/class/task.php index bba43d9..06f29e0 100644 --- a/src/class/task.php +++ b/src/class/task.php @@ -87,6 +87,11 @@ if ( ! defined( 'ABSPATH' ) ) { die; } +require_once dirname( __FILE__ ) . '/config.php'; +require_once dirname( __FILE__ ) . '/convert.php'; +require_once dirname( __FILE__ ) . '/settings.php'; +require_once dirname( __FILE__ ) . '/template.php'; + /** * Searches and replaces the footnotes and generates the reference container. * diff --git a/src/class/widgets/reference-container.php b/src/class/widgets/reference-container.php index 7c00f82..c2e801b 100644 --- a/src/class/widgets/reference-container.php +++ b/src/class/widgets/reference-container.php @@ -7,6 +7,10 @@ * @since 1.5.0 */ +require_once dirname( __FILE__, 2 ) . '/config.php'; +require_once dirname( __FILE__, 2 ) . '/settings.php'; +require_once dirname( __FILE__ ) . '/base.php'; + /** * Registers a Widget to put the Reference Container to the widget area. * diff --git a/src/class/wysiwyg.php b/src/class/wysiwyg.php index f68ea8c..4c6dbd9 100644 --- a/src/class/wysiwyg.php +++ b/src/class/wysiwyg.php @@ -7,6 +7,10 @@ * @since 1.5.0 */ +require_once dirname( __FILE__ ) . '/config.php'; +require_once dirname( __FILE__ ) . '/settings.php'; +require_once dirname( __FILE__ ) . '/template.php'; + /** * Handles the WSYIWYG-Buttons. * diff --git a/src/footnotes.php b/src/footnotes.php index 90bc462..e00e390 100755 --- a/src/footnotes.php +++ b/src/footnotes.php @@ -21,9 +21,9 @@ * License: GPL v3 * License URI: https://www.gnu.org/licenses/gpl-3.0.html */ - + declare(strict_types=1); - + /** * Defines the current Plugin version. * @@ -50,11 +50,11 @@ const PRODUCTION_ENV = false; */ const PLUGIN_ENTRYPOINT = 'footnotes/footnotes.php'; -// Get all common classes and functions. -require_once dirname( __FILE__ ) . '/includes.php'; +// Requires the core Plugin file. +require_once dirname( __FILE__ ) . '/class/init.php'; // Add links to the ‘Installed Plugins’ page on the WordPress dashboard. -add_filter( "plugin_action_links_" . PLUGIN_ENTRYPOINT, array( 'Footnotes_Hooks', 'get_plugin_links' ), 10, 2 ); +add_filter( 'plugin_action_links_' . PLUGIN_ENTRYPOINT, array( 'Footnotes_Hooks', 'get_plugin_links' ), 10, 2 ); // Initialize the Plugin. $g_obj_mci_footnotes = new Footnotes(); diff --git a/src/includes.php b/src/includes.php deleted file mode 100644 index 00ebb6c..0000000 --- a/src/includes.php +++ /dev/null @@ -1,39 +0,0 @@ -