[wp-trac] [WordPress Trac] #27801: `wp_dirname()` to match	`wp_basename()`
    WordPress Trac 
    noreply at wordpress.org
       
    Mon Apr 14 16:41:05 UTC 2014
    
    
  
#27801: `wp_dirname()` to match `wp_basename()`
-------------------------------+-----------------------------
 Reporter:  Denis-de-Bernardy  |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  I18N               |    Version:  trunk
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 There's an i18n friendly wp_basename() function in core. Perhaps we should
 also add an i18n friendly version of dirname() to match it?
 {{{
 /**
  * i18n friendly version of dirname()
  *
  * @since 3.9.0
  *
  * @param string $path A path.
  * @return string
  */
 function wp_dirname( $path ) {
         return urldecode( dirname( str_replace( array( '%2F', '%5C' ),
 '/', urlencode( $path ) ) ) );
 }
 }}}
 References: #11887, #21217, #23267, etc.
 https://core.trac.wordpress.org/search?q=wp_basename
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27801>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list