68669/how-to-get-the-current-plugin-directory-in-wordpress
I need to get the current plugin directory like
[wordpress_install_dir]/wp-content/plugins/plugin_name
(if getcwd() called from the plugin, it returns [wordpress_install_dir], the root of installation)
thanks for help
Hello @kartik,
This will actually get the result you want:
<?php plugin_dir_url(__FILE__); ?>
Hope this works!!
Thank you!
Hello, Here is a code sample of a good ...READ MORE
Hii, The easiest way to do this: class MyController ...READ MORE
Hello @kartik, Set posts_per_page parameter in args to ...READ MORE
Hello kartik, You need to specify when the ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
Hello, This is simple you just need to ...READ MORE
Hey @kartik, Named routing is another amazing feature of ...READ MORE
Hello @kartik, You'll be wanting to use glob() Example: $files = ...READ MORE
Hello, Try this code: if (!function_exists('getallheaders')) { ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.