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: http://core.svn.wordpress.org/trunk@23821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a87c00edee
commit
2a45fd4453
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue