Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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="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.

share|improve this question
    
So, you want only the image editor not the image uploader in popup? –  Sisir Mar 11 '12 at 9:02
    
That is correct @Sisir or at the least open it directly. –  mattrepublic Mar 19 '12 at 13:14
add comment

1 Answer

up vote 0 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.