The argument order in module_load_incude is frustratingly stupid.
module_load_include('inc', 'node', 'node.admin');
It requires devs (even those of us who use this thing all the time) to continue to look up the order because it's so non-intuitive. Ideally, this function would not be specific to modules, and would allow you to specify the entire file name as a single argument. something like...
backdrop_load_include('module', 'node.admin.inc');
or
backdrop_include_file('theme', 'basis', 'template.php');
We could even go one step further and always limit the search for .tpl.php files to the modulename/templates or themename/templates directory, .css files to modulename/css or themename/css and .js files to modulename/js or themename/js. This pattern can be extended to anything else we decide to neatly place into subdirectories (.test files in modulename/tests, etc).
This issue will depend on the addition of the BC layer, and the dupal.inc file.
Recent comments
This relates to a problem with creating a View of Projects on a site using MySQL >= 8.0.3 https://github.com/backdrop/backdrop-issues/issues/5795 I can't be at the meeting this...
Dec 5th Weekly Dev Meeting
Additionally, "outside" means a file that is located outside a module folder. The second parameter of module_load_include() is the name of a module, so, this function assumes that you are loading a...
How to include other files in module?
Yes, it does mean outside your functions. You can use module_load_include() within functions but not outside. The YouTube module gives an example: <?php /** * @file * Youtube field module adds...
How to include other files in module?