-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
js script integration: absolute file path doesn't work #186
Comments
Please, try using the latest from GitHub, that place already undergone a lot of changes. Let me know if it is still not good enough. |
Ok, I've tried the latest from GitHub. I suggest to add to your code the following line (file qtx_admin.php between line #300 and #301): if(file_exists($src)) continue; // absolute path provided |
That place not always read file from the system but sometimes enqueues it using There is a piece of code after line "//make src to be relative to WP_CONTENT_DIR", which converts the path provided into a path relative to WP_CONTENT_DIR. I modified it to take into account absolute paths. Please, test it and let me know if it is ok. Thanks a lot. |
Tested. Now it works. |
Good, I am glad. Yes, please, test the latest version as much as you can and let me know if you found something. I guess we can close this issue for now. |
When I need JS script to be executed before or after the line “new qTranslateX” - there is an option to add my script with JSON-encoded configuration.
The description from your docs:
the problem is that you always add 'plugins path' to the path from configuration field:
I develop a theme, not a plugin. In my case it's very inconvenient to create a special path to my script relative to Plugins directory. Could you fix it?
The text was updated successfully, but these errors were encountered: