WordPress.org

Make WordPress Core

Ticket #10145: srcurl.diff

File srcurl.diff, 646 bytes (added by Otto42, 5 years ago)

Adds filter to source url, making smilie replacement plugins simpler

  • trunk/wp-includes/formatting.php

     
    13171317        $smiley = trim(reset($smiley)); 
    13181318        $img = $wpsmiliestrans[$smiley]; 
    13191319        $smiley_masked = esc_attr($smiley); 
     1320         
     1321        $srcurl = apply_filters('smilies_src', "$siteurl/wp-includes/images/smilies/$img", $img, $siteurl); 
    13201322 
    1321         return " <img src='$siteurl/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> "; 
     1323        return " <img src='$srcurl' alt='$smiley_masked' class='wp-smiley' /> "; 
    13221324} 
    13231325 
    13241326