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:
Andrew Ozz
2009-09-10 22:07:33 +00:00
parent 09845dfd03
commit 4f22e99cf5
28 changed files with 2335 additions and 42 deletions
+11
View File
@@ -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;
}