• Resolved OrbiTorbi

    (@orbitorbi)


    Hey guys,

    im looking for a chance to edit images directly from edit posts.
    This means with clicking on the image, the dialog to edit the images should appear (like in the media center).

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator James Huff

    (@macmanx)

    You should already be able to do that.

    When you click an image in the editor, a toolbar should appear above it. One of the buttons in the toolbar is a pencil. Click this pencil button to edit the image.

    Thread Starter OrbiTorbi

    (@orbitorbi)

    Yes you are right if the image is shown in the editor.

    But im looking for the dialog oudside of the editor.
    Im writing a plugin that shows you all images to the post, just a simple list of images at the bottom. And im looking for that dialog:
    Screen

    Moderator James Huff

    (@macmanx)

    Ah ok. I haven’t messed with that bit myself, but I assume you might be able to track it down in /wp-admin/media.php

    Thread Starter OrbiTorbi

    (@orbitorbi)

    Thanks for the tip!

    I will look in the media.php. Is it also possible to set a hook for the media upload? For example if i want to change the upload directory to /uploads/2015/01/postID/?

    So that all images from one post are at a seperat directory?

    Thanks for your help James!

    Moderator James Huff

    (@macmanx)

    Hm, I’m not sure myself either, but I have seen plugins set their own upload directories.

    Have you seen https://developer.wordpress.org/reference/ ?

    Moderator bcworkz

    (@bcworkz)

    Is it also possible to set a hook for the media upload? For example if i want to change the upload directory to /uploads/2015/01/postID/?

    Yes. Use the ‘upload_dir’ filter, applied from wp_upload_dir()

    Moderator James Huff

    (@macmanx)

    Thanks for helping, bcworkz!

    Thread Starter OrbiTorbi

    (@orbitorbi)

    Thanks guys :)!

    Moderator James Huff

    (@macmanx)

    You’re welcome!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘WP Media Editor’ is closed to new replies.