Wordpress ajax call
I have a small question for you. How can I dinamicaly get a plugin file path? I want to make an ajax call from a page to a file wich is in my plugins direct开发者_开发问答ory, and I don't want to use wp-content/ . . . . etc Is there a way to do that? So it can work on every site. Thank you
is this what you looking for:
$plugin_url =WP_PLUGIN_URL.'/'.dirname(plugin_basename (__FILE__));
this must be placed in your plugin file.
精彩评论