presuming that i am writing a wordpress wordpress plugin. now i would like its includes and can include includes to become in accordance with the wordpress directory so now you ask , there a worldwide variable/constant or perhaps a function to retreive this data ?
Yes that you can do
require_once(ABSPATH . 'wp-settings.php'); This provides you with the complete road to your WordPress Installation.
It is necessary if you're writing a wordpress plugin for public distribution, that you simply make certain that you don't hard code the pathways. This is among the greatest problems wordpress plugin developer's cause, because customers be capable of move these folders around.
The fundamental method of getting Web addresses towards the website is: get_bloginfo('url') <- would go to sites root get_bloginfo('wpurl') <- would go to wordpress' root which may be two various things. So this is an excellent method of getting towards the wordpress directory.
You will find also defined variables: Wordpress_Wordpress plugin_URL Wordpress_Wordpress plugin_DIR
A means recommended within the codex to obtain to your plugin's folder for includes is:
Should output: http://[url-path-to-plug ins]/[myplugin]/
Wherever the consumer places their plug ins folder.