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

fixes #33257
props wonderboymusic
Built from https://develop.svn.wordpress.org/trunk@33590


git-svn-id: http://core.svn.wordpress.org/trunk@33557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2015-08-06 20:40:26 +00:00
parent 4a31dd6fe8
commit 309516a6c1
3 changed files with 6 additions and 7 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 );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-RC2-33589';
$wp_version = '4.3-RC2-33590';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.