Add some filters to the image extraction-from-post bits so people with

existing postmeta-based flows can hook in and make magic happen.

props wonderboymusic. fixes #22960.

git-svn-id: https://develop.svn.wordpress.org/trunk@23821 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2013-03-27 19:07:58 +00:00
parent 334e0eb13e
commit 3817df14ec

View File

@ -2218,7 +2218,7 @@ function get_content_images( &$content, $html = true, $remove = false, $limit =
}
}
return array_values( array_unique( $srcs ) );
return apply_filters( 'content_images', array_values( array_unique( $srcs ) ), $content );
}
/**
@ -2236,7 +2236,7 @@ function get_content_image( &$content, $html = true, $remove = false ) {
if ( empty( $srcs ) )
return '';
return reset( $srcs );
return apply_filters( 'content_image', reset( $srcs ), $content );
}
/**
@ -2278,7 +2278,7 @@ function get_content_galleries( &$content, $remove = false, $limit = 0 ) {
}
}
return $galleries;
return apply_filters( 'content_galleries', $galleries, $content );
}
/**