Opened 15 years ago
Closed 12 years ago
#19419 closed enhancement (wontfix)
wp-admin/media.php: allow to add a default src
| Reported by: | mostyk | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 3.2.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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 ofwp_media_insert_url_form()but the hook is still namedtype_url_form_image.