[wp-trac] [WordPress Trac] #39414: New param in plugin_dir_path
WordPress Trac
noreply at wordpress.org
Wed Dec 28 09:47:43 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 | Resolution:
Keywords: | Focuses:
------------------------------+------------------------------
Comment (by swissspidy):
What is the advantage of `plugin_dir_path( __FILE__ , 'assets/test.png' )`
over simply using `plugin_dir_path( __FILE__ ) . 'assets/test.png' )`? I
don't really see a benefit of using a second param for that when you can
simply concatenate the strings on your own. Developers would probably not
use it because of back compat. Also, `plugin_dir_path()` says it returns
the path to a ''directory'', not a file.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39414#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list