Fix wp_create_thumbnail filter. Props filosofo. fixes #3654

git-svn-id: http://svn.automattic.com/wordpress/trunk@4796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-01-24 07:17:14 +00:00
parent d5eaea2f32
commit ed4186b15f
1 changed files with 3 additions and 4 deletions

View File

@ -1269,7 +1269,7 @@ function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
if ( $items ) { if ( $items ) {
foreach ( $items as $item ) { foreach ( $items as $item ) {
// A page cannot be it's own parent. // A page cannot be its own parent.
if (!empty ( $post_ID ) ) { if (!empty ( $post_ID ) ) {
if ( $item->ID == $post_ID ) { if ( $item->ID == $post_ID ) {
continue; continue;
@ -2190,7 +2190,7 @@ function wp_create_thumbnail( $file, $max_side, $effect = '' ) {
$thumbpath = str_replace( basename( $file ), $thumb, $file ); $thumbpath = str_replace( basename( $file ), $thumb, $file );
// move the thumbnail to it's final destination // move the thumbnail to its final destination
if ( $type[2] == 1 ) { if ( $type[2] == 1 ) {
if (!imagegif( $thumbnail, $thumbpath ) ) { if (!imagegif( $thumbnail, $thumbpath ) ) {
$error = __( "Thumbnail path invalid" ); $error = __( "Thumbnail path invalid" );
@ -2215,8 +2215,7 @@ function wp_create_thumbnail( $file, $max_side, $effect = '' ) {
if (!empty ( $error ) ) { if (!empty ( $error ) ) {
return $error; return $error;
} else { } else {
apply_filters( 'wp_create_thumbnail', $thumbpath ); return apply_filters( 'wp_create_thumbnail', $thumbpath );
return $thumbpath;
} }
} }