Make WordPress Core

Ticket #31717: 31717.diff

File 31717.diff, 568 bytes (added by mattwiebe, 9 years ago)
  • wp-includes/media.php

     
    34093409        );
    34103410        $post_id = $wpdb->get_var( $sql );
    34113411
     3412        /**
     3413         * Filter an attachment id found by URL.
     3414         *
     3415         * @since 4.2.0
     3416         *
     3417         * @param int|null $post_id  The post_id (if any) found by the function.
     3418         * @param string   $url      The URL being looked up.
     3419         */
     3420        $post_id = apply_filters( 'attachment_url_to_postid', $post_id, $url );
     3421
    34123422        return (int) $post_id;
    34133423}
    34143424