ITSEC_Lib::get_module_path inserts system path into url to js
-
ITSEC_Lib::get_module_path inserts system path into url to js
Example of bad url output:
https://my.domain.com/wp-content/plugins/better-wp-security/C:/my/file/system/path/wp-content/plugins/better-wp-security/core/modules/strong-passwords/js/script.js?ver=4074Line 20 better-wp-security\core\modules\strong-passwords\class-itsec-strong-passwords.php
` public function add_scripts() {
$module_path = ITSEC_Lib::get_module_path( __FILE__ );wp_enqueue_script( ‘itsec_strong_passwords’, $module_path . ‘js/script.js’, array( ‘jquery’ ), ITSEC_Core::get_plugin_build() );
}// $module_path = plugin_dir_url(__FILE__ ); returns correct url
The topic ‘ITSEC_Lib::get_module_path inserts system path into url to js’ is closed to new replies.