From 694a03be6aa5c8842bad91c4e1ca200839b669dc Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 12 Jul 2013 20:34:07 +0000 Subject: [PATCH] Drop get_images_in_content() and get_image_in_content(), until recently get_content_image(s)(). fixes #24202. git-svn-id: https://develop.svn.wordpress.org/trunk@24685 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/media.php | 73 ------------------------------------------- 1 file changed, 73 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index 4efded06e6..1362f78bbb 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1892,79 +1892,6 @@ function get_media_embedded_in_content( $content, $types = null ) { return $html; } -/** - * Check the content blob for images or image srcs - * - * @since 3.6.0 - * - * @param string $content A string which might contain image data. - * @param boolean $html Whether to return HTML or URLs in the array - * @return array The found images or srcs - */ -function get_images_in_content( $content, $html = true ) { - $tags = array(); - $captions = array(); - - if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) ) { - foreach ( $matches as $shortcode ) { - if ( 'caption' === $shortcode[2] ) { - $captions[] = $shortcode[0]; - if ( $html ) - $tags[] = do_shortcode_tag( $shortcode ); - } - } - } - - foreach ( array( 'a', 'img' ) as $tag ) { - if ( preg_match_all( '#' . get_tag_regex( $tag ) . '#i', $content, $matches, PREG_SET_ORDER ) ) { - foreach ( $matches as $node ) { - if ( ! strstr( $node[0], '