Make WordPress Core

Changeset 33590


Ignore:
Timestamp:
08/06/2015 08:39:35 PM (8 years ago)
Author:
markjaquith
Message:

Move media hooks out of admin-filters.php as sometimes editors are used on the front end.

fixes #33257
props wonderboymusic

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/admin-filters.php

    r33468 r33590  
    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' );
     
    3533
    3634add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );
    37 
    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 );
    4135
    4236add_filter( 'media_upload_gallery', 'media_upload_gallery' );
  • trunk/src/wp-includes/default-filters.php

    r33492 r33590  
    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 );
Note: See TracChangeset for help on using the changeset viewer.