It seems that bloginfo('plugins_directory') is not available is WP 1.5. It would be convenient to provide such path in some cases. Is-it planned for WP 1.6 ?
Thanks
It seems that bloginfo('plugins_directory') is not available is WP 1.5. It would be convenient to provide such path in some cases. Is-it planned for WP 1.6 ?
Thanks
"Is-it planned for WP 1.6 ?"
I doubt it.
bloginfo() primarily displays a selection of data stored in the options table. No information about the plugins directory is retained there, probably because it has a permanent location in relation to the WordPress installation (unlike say the active theme's template directory). If you need access to the plugins directory, for a path use something like:
$plugins_dir = ABSPATH . 'wp-content/plugins/';
and for a url:
$plugins_url = get_bloginfo('url') . '/wp-content/plugins/';
Thanks for the tips. It is a straightforward solution.
Nevertheless, since there is already a get_bloginfo('template_directory'), I would think that it would be consistent to also have a get_bloginfo('plugins_directory').
This topic has been closed to new replies.