Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS onSaved event?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33475
    Timothy Smith
    Participant

    Hi everyone,

    I have built and designed a theme that was perfect for a responsive layout.

    The problem I have is that the site owner has little to no concept of WordPress. I am teaching him but he is stubborn. I would like to find a way to remove the height and width properties of image tags when he saves an article, page, or slide. He is using the default images editor.

    Does anyone know of a way to do this?

    Thanks,

    Tim Smith

    #101033
    Senff
    Participant

    I would just tell him to ignore/disregard the “width” and “height” properties. But if he’s really that stubborn and you MUST remove these from the HTML, open wp-includesmedia.php and find this line:

    $html = '' . esc_attr($alt) . '';

    It should be in the function get_image_tag. Remove the part that writes out $hwstring so that you end up with:

    $html = '' . esc_attr($alt) . '';
    #101035
    Timothy Smith
    Participant

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.