How do I link to the image editor’s Edit Image function from the front end?

I know that I can open the lightbox with a simple link, such as <a href="https://wordpress.stackexchange.com/questions/29735/wp-admin/media-upload.php?post_id=719&amp;type=image" id="content-add_image" class="thickbox add_image" title="Add an Image">Upload photos</a>

However unlike opening the image edit lightbox, Edit Image is an input… example: <input type="button" id="imgedit-open-btn-766" onclick="imageEdit.open( 766, &quot;83bc6c7af5&quot; )" class="button" value="Edit Image">

Any thoughts or direction would be appreciated.

The screenshot below is from v3.3 nightly.

EDIT: The direct url to the editor in the backend is wp-admin/media.php?attachment_id=772&action=edit. My goal is to get this edit form to popout in the lightbox without the other wp-admin stuff.

2 Answers
2

You may add the following scripts:

wp_enqueue_script( 'wp-ajax-response' );
wp_enqueue_script('image-edit');
wp_enqueue_style('imgareaselect');

Maybe this already helps?

I think the html in the front-end should be similar to the html in /wp-admin/media.php?attachment_id=...&action=edit

Leave a Reply

Your email address will not be published. Required fields are marked *