Changeset 10765
- Timestamp:
- 03/10/2009 07:50:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/plugin.php
r10411 r10765 495 495 $file = preg_replace('|^' . preg_quote($plugin_dir, '|') . '/|','',$file); // get relative path from plugins dir 496 496 return $file; 497 } 498 499 /** 500 * Gets the filesystem directory path (with trailing slash) for the plugin __FILE__ passed in 501 * @package WordPress 502 * @subpackage Plugin 503 * @since 2.8 504 * 505 * @param string $file The filename of the plugin (__FILE__) 506 * @return string the filesystem path of the directory that contains the plugin 507 */ 508 function plugin_dir_path( $file ) { 509 return trailingslashit( dirname( $file ) ); 510 } 511 512 /** 513 * Gets the URL directory path (with trailing slash) for the plugin __FILE__ passed in 514 * @package WordPress 515 * @subpackage Plugin 516 * @since 2.8 517 * 518 * @param string $file The filename of the plugin (__FILE__) 519 * @return string the URL path of the directory that contains the plugin 520 */ 521 function plugin_dir_url( $file ) { 522 return trailingslashit( plugins_url( '', $file ) ); 497 523 } 498 524
Note: See TracChangeset
for help on using the changeset viewer.