WordPress.org

Make WordPress Core

Ticket #19181: imagelinkfilter.diff

File imagelinkfilter.diff, 1.2 KB (added by ryanimel, 3 years ago)
  • wp-admin/includes/media.php

     
    766766        elseif ( $url_type == 'post' ) 
    767767                $url = $link; 
    768768 
    769         return " 
    770         <input type='text' class='text urlfield' name='attachments[$post->ID][url]' value='" . esc_attr($url) . "' /><br /> 
    771         <button type='button' class='button urlnone' title=''>" . __('None') . "</button> 
    772         <button type='button' class='button urlfile' title='" . esc_attr($file) . "'>" . __('File URL') . "</button> 
    773         <button type='button' class='button urlpost' title='" . esc_attr($link) . "'>" . __('Post URL') . "</button> 
    774 "; 
     769        $output = " 
     770                <input type='text' class='text urlfield' name='attachments[$post->ID][url]' value='" . esc_attr($url) . "' /><br /> 
     771                <button type='button' class='button urlnone' title=''>" . __('None') . "</button> 
     772                <button type='button' class='button urlfile' title='" . esc_attr($file) . "'>" . __('File URL') . "</button> 
     773                <button type='button' class='button urlpost' title='" . esc_attr($link) . "'>" . __('Post URL') . "</button> 
     774        "; 
     775 
     776        return apply_filters( 'image_link_input_fields_output', $output, $post, $url_type, $file, $link ); 
     777 
    775778} 
    776779 
    777780/**