WordPress.org

Make WordPress Core

Changeset 23821


Ignore:
Timestamp:
03/27/13 19:07:58 (13 months ago)
Author:
markjaquith
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r23819 r23821  
    22192219    } 
    22202220 
    2221     return array_values( array_unique( $srcs ) ); 
     2221    return apply_filters( 'content_images', array_values( array_unique( $srcs ) ), $content ); 
    22222222} 
    22232223 
     
    22372237        return ''; 
    22382238 
    2239     return reset( $srcs ); 
     2239    return apply_filters( 'content_image', reset( $srcs ), $content ); 
    22402240} 
    22412241 
     
    22792279    } 
    22802280 
    2281     return $galleries; 
     2281    return apply_filters( 'content_galleries', $galleries, $content ); 
    22822282} 
    22832283 
Note: See TracChangeset for help on using the changeset viewer.