Opened 13 years ago
Closed 12 years ago
#19696 closed enhancement (fixed)
Allow to change the "Insert into post" button
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Upload | Keywords: | |
Focuses: | Cc: |
Description
You can change in the wp-admin/includes/media.php line 1143
if ( $send ) $send = get_submit_button( __( 'Insert into Post' ), 'button', "send[$attachment_id]", false );
to something like this
if ( $send ) $send = apply_filters('add_media_button',get_submit_button( __( 'Insert into Post' ), 'button', "send[$attachment_id]", false ),$send,$attachment_id,$attachment_url);
to allow use the upload in any kind of sitution thanks.
Attachments (2)
Change History (12)
#2
follow-up:
↓ 6
@
13 years ago
- Type changed from feature request to enhancement
Something like this is definitely needed, but I'm not sure if a filter on that single button is enough.
#3
@
13 years ago
- Summary changed from Allow to change de the Insert to post button to Allow to change the "Insert into post" button
#6
in reply to:
↑ 2
@
13 years ago
Replying to scribu:
Something like this is definitely needed, but I'm not sure if a filter on that single button is enough.
Well that single button was the only missing link to me, for the reste some custom url in tb_show, the "get_media_item_args" and "image_size_names_choose" filters and a little bit of js will do the job, but i'm still learning wordpress maybe there was something i mising.
#7
follow-up:
↓ 8
@
13 years ago
Also It would be a very good idea , if we allow to insert the content from thickbox window to a specfic text area either the default editor .
#8
in reply to:
↑ 7
;
follow-up:
↓ 9
@
13 years ago
Replying to alex-ye:
Also It would be a very good idea , if we allow to insert the content from thickbox window to a specfic text area either the default editor .
You can insert the content wherever you want, you only need to overwrite the send_to_editor function.
#9
in reply to:
↑ 8
@
13 years ago
Replying to pedrogas_g:
Replying to alex-ye:
Also It would be a very good idea , if we allow to insert the content from thickbox window to a specfic text area either the default editor .
You can insert the content wherever you want, you only need to overwrite the send_to_editor function.
I know that but I want to make it possible thing using PHP only , this will be easier . By the way there is a way to change the "Insert into post" button using JavaScript too , see:
https://github.com/farinspace/wpalchemy/blob/dev/wp-content/wpalchemy/MediaAccess.php
The file with the modification