Skip to content

Instantly share code, notes, and snippets.

@derekshirk
Created June 12, 2015 16:32
Show Gist options
  • Save derekshirk/d6d9e9e216af769035ca to your computer and use it in GitHub Desktop.
Save derekshirk/d6d9e9e216af769035ca to your computer and use it in GitHub Desktop.
WP-Plugin-Handy-Plugin-Path-and-URL-Helpers
<?php
$file = dirname(__FILE__) . '/your-main-plugin-file.php';
$plugin_url = plugin_dir_url($file);
$plugin_path = plugin_dir_path($file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment