diff --git a/wp-includes/media.php b/wp-includes/media.php index 50394fc696..9ea02fe15c 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -881,7 +881,7 @@ function wp_audio_shortcode( $attr ) { } if ( ! $primary ) { - $audios = get_attached_audio( $post_id ); + $audios = get_attached_media( 'audio', $post_id ); if ( empty( $audios ) ) return; @@ -999,7 +999,7 @@ function wp_video_shortcode( $attr ) { } if ( ! $primary ) { - $videos = get_attached_video( $post_id ); + $videos = get_attached_media( 'video', $post_id ); if ( empty( $videos ) ) return; @@ -1865,30 +1865,6 @@ function get_attached_media( $type, $post_id = 0 ) { return (array) apply_filters( 'get_attached_media', $children, $type, $post ); } -/** - * Retrieve audio attached to the passed post - * - * @since 3.6.0 - * - * @param int $post_id Post ID - * @return array Found audio attachments - */ -function get_attached_audio( $post_id = 0 ) { - return get_attached_media( 'audio', $post_id ); -} - -/** - * Retrieve video attached to the passed post - * - * @since 3.6.0 - * - * @param int $post_id Post ID - * @return array Found video attachments - */ -function get_attached_video( $post_id = 0 ) { - return get_attached_media( 'video', $post_id ); -} - /** * Extract and parse {media type} shortcodes or srcs from the passed content * @@ -2022,18 +1998,6 @@ function get_embedded_video( $content ) { return get_embedded_media( 'video', $content ); } -/** - * Retrieve images attached to the passed post - * - * @since 3.6.0 - * - * @param int $post_id Optional. Post ID. - * @return array Found image attachments - */ -function get_attached_images( $post_id = 0 ) { - return get_attached_media( 'image', $post_id ); -} - /** * Retrieve images attached to the passed post * @@ -2043,7 +2007,7 @@ function get_attached_images( $post_id = 0 ) { * @return array Found image attachments */ function get_attached_image_srcs( $post_id = 0 ) { - $children = get_attached_images( $post_id ); + $children = get_attached_media( 'image', $post_id ); if ( empty( $children ) ) return array();