Advertisement
crissoca

Untitled

Apr 30th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. // Original way to define the constants
  2. if (!defined('PLUGIN_URL'))
  3.   define('PLUGIN_URL', WP_CONTENT_URL . '/plugins');
  4. if (!defined('PLUGIN_PATH'))
  5.   define('PLUGIN_PATH', WP_CONTENT_DIR . '/plugins');
  6.  
  7. // Optimal way to define the constants (using plugins_url and plugin_dir_path)
  8. if (!defined('PLUGIN_URL'))
  9.   define('PLUGIN_URL', plugins_url());
  10. if (!defined('PLUGIN_PATH'))
  11.   define('PLUGIN_PATH', plugin_dir_path());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement