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

fixes #33257
props wonderboymusic

git-svn-id: https://develop.svn.wordpress.org/trunk@33590 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2015-08-06 20:39:35 +00:00
parent f29b25e104
commit 3d15757198
2 changed files with 5 additions and 6 deletions

View File

@ -17,8 +17,6 @@ add_action( 'activity_box_end', 'wp_dashboard_quota' );
// Media hooks.
add_action( 'attachment_submitbox_misc_actions', 'attachment_submitbox_metadata' );
add_action( 'media_buttons', 'media_buttons' );
add_action( 'media_upload_image', 'wp_media_upload_handler' );
add_action( 'media_upload_audio', 'wp_media_upload_handler' );
add_action( 'media_upload_video', 'wp_media_upload_handler' );
@ -35,10 +33,6 @@ add_filter( 'async_upload_file', 'get_media_item', 10, 2 );
add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );
add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );
add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );
add_filter( 'media_upload_gallery', 'media_upload_gallery' );
add_filter( 'media_upload_library', 'media_upload_library' );

View File

@ -401,4 +401,9 @@ add_action( 'admin_init', '_wp_admin_bar_init' );
add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
// Former admin filters that can also be hooked on the front end
add_action( 'media_buttons', 'media_buttons' );
add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );
add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );
unset( $filter, $action );