Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
745 views
in Plugins by
edited by

This question might be related to: http://question2answer.org/qa/14041/how-to-get-plugin-url-in-widget-php-file

I have my page and need the correct URL to q2a-installation.com/qa-plugin/myplugin/page.php

How to do that?

qa_path_to_root() does not help. Both return the page's URL.

Even trying to access the plugin global: $urltoroot does not work.

 

Calling QA_HTML_THEME_LAYER_URLTOROOT or QA_HTML_THEME_LAYER_DIRECTORY direclty does not work either. We are in function process_request($request).

Q2A version: 1.5.4

1 Answer

+2 votes
by

This should work:

$this->urltoroot

by
I have finally opened an issue at github to get the correct URL under all circumstances: https://github.com/q2a/question2answer/issues/122
...