Just for my notes:
Line 790
file public/class-h5p-plugin.php
-
This reply was modified 3 years, 10 months ago by catcrash.
Actually, you’re partially right. Spend a couple of hours trying to address the issue. For some reason I had plugin_dir_url function return an empty string.
As solution I got – to define:
define( ‘WP_PLUGIN_DIR’, ‘/home/zzz/www/wp-content/plugins’ );
define( ‘WP_PLUGIN_URL’, $http_protocol.$_SERVER[‘HTTP_HOST’].’/wp-content/plugins’ );
Also as an opportunity to improve:
when plugin_dir_url returns an empty string – it leads the final string to look like: “//wp-content/…” (with 2 head slashes) and then recognized by the browser as a part of the URL hostname (trying to resolve host http://wp-content/…). I would propose to stripe double slashes in the final string as this potential shouldn’t happen (double slashes) for any reason.