Make WordPress Core

Opened 13 years ago

Closed 10 years ago

#19419 closed enhancement (wontfix)

wp-admin/media.php: allow to add a default src

Reported by: mostyk's profile mostyk Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Media Keywords:
Focuses: Cc:


something like

in file wp-admin/media.php :

function type_url_form_image($image_url) {

<input id="src" name="src" value="'.$image_url.'" type="text"


might be helpful because the function can be reused for plugins

Change History (2)

#1 @kurtpayne
13 years ago

  • Cc kpayne@… added
  • Keywords needs-testing removed

If this is being used for a plugin, is this something that can also be solved in the plugin?

add_action( 'type_url_form_media' , 'myplugin_add_src' );
function myplugin_add_src( $html ) {
	return $html . '<script>jQuery("#src").val("my image source here");</script>';

Note: In 3.3 type_url_form_image() has been deprecated in favor of wp_media_insert_url_form() but the hook is still named type_url_form_image.

#2 @jeremyfelt
10 years ago

  • Component changed from External Libraries to Media
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

It does seem that the type_url_form_media filter could be used to replace or append to the output of wp_media_insert_url_form(). Feel free to reopen if this is still a concern.

Note: See TracTickets for help on using tickets.