[wp-trac] [WordPress Trac] #39414: New param in plugin_dir_path
WordPress Trac
noreply at wordpress.org
Wed Dec 28 09:02:46 UTC 2016
#39414: New param in plugin_dir_path
------------------------------+-----------------------------
Reporter: sebastian.pisula | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version:
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
New param - `path`. Function with this param return full path to file.
Examples:
{{{#!php
<?php
var_dump(plugin_dir_path(__FILE__));
var_dump(plugin_dir_path(__FILE__, 'assets/test.png'));
}}}
{{{
string(26) "\wp-content\plugins\myplugin/"
string(41) "\wp-content\plugins\myplugin/assets/test.png"
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39414>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list