WordPress.org

Make WordPress Core

Ticket #33257: 33257.diff

File 33257.diff, 1.6 KB (added by wonderboymusic, 6 years ago)
  • src/wp-admin/includes/admin-filters.php

     
    1717// Media hooks.
    1818add_action( 'attachment_submitbox_misc_actions', 'attachment_submitbox_metadata' );
    1919
    20 add_action( 'media_buttons', 'media_buttons' );
    21 
    2220add_action( 'media_upload_image', 'wp_media_upload_handler' );
    2321add_action( 'media_upload_audio', 'wp_media_upload_handler' );
    2422add_action( 'media_upload_video', 'wp_media_upload_handler' );
     
    3533
    3634add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );
    3735
    38 add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );
    39 
    40 add_filter( 'media_send_to_editor',      'image_media_send_to_editor',      10, 3 );
    41 
    4236add_filter( 'media_upload_gallery', 'media_upload_gallery' );
    4337add_filter( 'media_upload_library', 'media_upload_library' );
    4438
  • src/wp-includes/default-filters.php

     
    401401add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
    402402add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
    403403
     404// Former admin filters that can also be hooked on the front end
     405add_action( 'media_buttons', 'media_buttons' );
     406add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );
     407add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );
     408
    404409unset( $filter, $action );