mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Image editing (first run). Includes code by stephanreiter, see #10528
git-svn-id: https://develop.svn.wordpress.org/trunk@11911 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -141,3 +141,14 @@ if ( !function_exists('json_decode') ) {
|
||||
return $wp_json->decode( $string );
|
||||
}
|
||||
}
|
||||
|
||||
// pathinfo that fills 'filename' without extension like in PHP 5.2+
|
||||
function pathinfo52($path) {
|
||||
$parts = pathinfo($path);
|
||||
if ( !isset($parts['filename']) ) {
|
||||
$parts['filename'] = substr( $parts['basename'], 0, strrpos($parts['basename'], '.') );
|
||||
if ( empty($parts['filename']) ) // there's no extension
|
||||
$parts['filename'] = $parts['basename'];
|
||||
}
|
||||
return $parts;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user