I am trying to set up automatic loading of classes in a wordpress plugin using the spl_autoload_register function. Everything connects normally, the plugin works, but wordpress generates warnings that do not seem to relate to my plugin:
Warning: include(ΠΏΠ°ΠΏΠΊΠ° ΠΏΠ»Π°Π³ΠΈΠ½Π°/class-loco-hooks-loadhelper.php): failed to open stream: No such file or directory in ΠΏΠ°ΠΏΠΊΠ° ΠΏΠ»Π°Π³ΠΈΠ½Π°\functions.php on line 8 Warning: include(): Failed opening 'ΠΏΠ°ΠΏΠΊΠ° ΠΏΠ»Π°Π³ΠΈΠ½Π°/class-loco-hooks-loadhelper.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in ΠΏΠ°ΠΏΠΊΠ° ΠΏΠ»Π°Π³ΠΈΠ½Π°\functions.php on line 8 Class autoload function:
function my_plugin_autoload($class){ $file = str_replace('_', '-', strtolower($class)); include (__DIR__.'/class-'.$file.'.php'); // ΡΠ° ΡΠ°ΠΌΠ°Ρ 8-Π°Ρ ΡΡΡΠΎΠΊΠ° }
loco_hooks_loadhelpertype isloco_hooks_loadhelper, converted and it is searched in the__DIR__folder. - user207618