[wp-trac] [WordPress Trac] #19419: wp-admin/media.php: allow to add a default src

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 22 23:01:36 UTC 2011


#19419: wp-admin/media.php: allow to add a default src
--------------------------------+------------------------------
 Reporter:  mostyk              |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  External Libraries  |     Version:  3.2.1
 Severity:  normal              |  Resolution:
 Keywords:                      |
--------------------------------+------------------------------
Changes (by kurtpayne):

 * cc: kpayne@… (added)
 * keywords:  needs-testing =>


Comment:

 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`.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19419#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list