Changeset 24571
- Timestamp:
- 07/05/2013 08:41:49 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r24570 r24571 882 882 883 883 if ( ! $primary ) { 884 $audios = get_attached_ audio($post_id );884 $audios = get_attached_media( 'audio', $post_id ); 885 885 if ( empty( $audios ) ) 886 886 return; … … 1000 1000 1001 1001 if ( ! $primary ) { 1002 $videos = get_attached_ video($post_id );1002 $videos = get_attached_media( 'video', $post_id ); 1003 1003 if ( empty( $videos ) ) 1004 1004 return; … … 1867 1867 1868 1868 /** 1869 * Retrieve audio attached to the passed post1870 *1871 * @since 3.6.01872 *1873 * @param int $post_id Post ID1874 * @return array Found audio attachments1875 */1876 function get_attached_audio( $post_id = 0 ) {1877 return get_attached_media( 'audio', $post_id );1878 }1879 1880 /**1881 * Retrieve video attached to the passed post1882 *1883 * @since 3.6.01884 *1885 * @param int $post_id Post ID1886 * @return array Found video attachments1887 */1888 function get_attached_video( $post_id = 0 ) {1889 return get_attached_media( 'video', $post_id );1890 }1891 1892 /**1893 1869 * Extract and parse {media type} shortcodes or srcs from the passed content 1894 1870 * … … 2031 2007 * @return array Found image attachments 2032 2008 */ 2033 function get_attached_images( $post_id = 0 ) {2034 return get_attached_media( 'image', $post_id );2035 }2036 2037 /**2038 * Retrieve images attached to the passed post2039 *2040 * @since 3.6.02041 *2042 * @param int $post_id Optional. Post ID.2043 * @return array Found image attachments2044 */2045 2009 function get_attached_image_srcs( $post_id = 0 ) { 2046 $children = get_attached_ images($post_id );2010 $children = get_attached_media( 'image', $post_id ); 2047 2011 if ( empty( $children ) ) 2048 2012 return array();
Note: See TracChangeset
for help on using the changeset viewer.