WordPress.org

Make WordPress Core

Ticket #22960: 22960.7.diff

File 22960.7.diff, 848 bytes (added by wonderboymusic, 13 months ago)
  • wp-includes/media.php

    diff --git wp-includes/media.php wp-includes/media.php
    index b1e08fc..b1f4b70 100644
    function get_content_images( &$content, $html = true, $remove = false, $limit = 
    22182218                } 
    22192219        } 
    22202220 
    2221         return array_values( array_unique( $srcs ) ); 
     2221        return apply_filters( 'content_images', array_values( array_unique( $srcs ) ), $content ); 
    22222222} 
    22232223 
    22242224/** 
    function get_content_image( &$content, $html = true, $remove = false ) { 
    22362236        if ( empty( $srcs ) ) 
    22372237                return ''; 
    22382238 
    2239         return reset( $srcs ); 
     2239        return apply_filters( 'content_image', reset( $srcs ), $content ); 
    22402240} 
    22412241 
    22422242/** 
    function get_content_galleries( &$content, $remove = false, $limit = 0 ) { 
    22782278                } 
    22792279        } 
    22802280 
    2281         return $galleries; 
     2281        return apply_filters( 'content_galleries', $galleries, $content ); 
    22822282} 
    22832283 
    22842284/**