[resolved] 3.6b1 Remove the meta from image post format (3 posts)

  1. ScreenfeedFr
    Posted 3 years ago #


    When I want to use the image post format, I can choose an image, of course, or change it. But what if I want to remove it? Since the field containing the image ID is hidden, there is no way to empty it.
    A button like this should do the trick I think, with a bit of javascript of course (the data-placeholder will replace the image):
    <a class="wp-format-media-remove button hide-if-no-js" data-placeholder="<?php esc_attr_e('Select / Upload Image'); ?>" href="#"><?php _e('Remove Image'); ?></a>

    Also, I noticed something weird about the input:
    - The label has the class screen-reader-text, so it is accessible, good.
    - The input has a placeholder attribute, so it is intended to be displayed at some point, but its type is... hidden :(
    - Moreover, what about if javascript is disable, nothing will be shown?

    I think there's a confusion somewhere, I think both label and input should have the hide-if-js class (not screen-reader-text), or be completely hidden (and remove the placeholder attribute, useless in this case).


    Side-note: some filters/actions would be much appreciated in this new UI :)

  2. Dominik Schilling
    WordPress Dev
    Posted 3 years ago #

    The label is already gone.

    Ticket about ability to remove the data again: https://core.trac.wordpress.org/ticket/23959

  3. ScreenfeedFr
    Posted 3 years ago #

    OK my bad, the label has been removed when I was sleeping, and I didn't see this ticket >_>

    Thanks for your answer, Dominik.

Topic Closed

This topic has been closed to new replies.

About this Topic