Saturday, May 21, 2016

WordPress get current plugin directory path

While working with plugins sometimes we need the plugin directory path. WordPress provides a way to get the plugin current directory path.

use the following code which gives the plugin current directory path.

<?php $plugin_dir_path = dirname(__FILE__); ?>

$plugin_dir_path will give you the current plugin directory path.

No comments:

Post a Comment

MS SQL : How to identify fragmentation in your indexes?

Almost all of us know what fragmentation in SQL indexes are and how it can affect the performance. For those who are new Index fragmentation...