Extending the media manager for multiple featured images and insertion targets

  1. Doug

    I can't seem to find any similar suggestions, which is strange because I figured I wouldn't be the only one who would prefer some more hook and extension opportunities with the media manager (not to mention with the new one). The send_to_editor overwriting method is limited.

    The idea is this: allow developers to register not only multiple "featured images", but also allow them to add media buttons that insert the code into a custom target other than an mceEditor box, possibly even register a callback function to send the attachment data or html to.

    Example of multiple thumbnails: register_post_thumbnail($field_name, $metabox_title, .[other args]);
    (Note: I'm aware of the plugin for this, but it seems to be dead and it would be best if this could be incorporated into the core somehow)

    Example of setting insert targets (editors) and callbacks: Add Media
    (Note: I had tried the data-editor set to a normal textarea and the "insert into post" button just inserted it into the main content editor", please let me know if I'm doing it wrong)

    Also, it might be interesting to allow for the custom image sizes to be visible in the size selector, maybe done like this:
    add_image_size($slug, $width, $height, $crop, $show_in_ui);
    $show_in_ui would be a string for the human readable name, and would show up if set.

    Posted: 5 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    5 Votes
  • Status

    This idea is under consideration