diff --git a/src/wp-admin/includes/admin-filters.php b/src/wp-admin/includes/admin-filters.php index 2f0e225781..d0709f4f8a 100644 --- a/src/wp-admin/includes/admin-filters.php +++ b/src/wp-admin/includes/admin-filters.php @@ -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' ); diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 27b0aa784a..a1c9c97335 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -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 );