Ticket #22085: media.php.patch
File media.php.patch, 640 bytes (added by , 12 years ago) |
---|
-
media.php
1220 1220 } 1221 1221 add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' ); 1222 1222 1223 function wp_plupload_include_attachment_id( $params ) { 1224 global $post_ID; 1225 if ( isset( $post_ID ) ) 1226 $params['post_id'] = (int) $post_ID; 1227 1228 return $params; 1229 } 1230 add_filter( 'plupload_default_params', 'wp_plupload_include_attachment_id' ); 1231 1223 1232 /** 1224 1233 * Prepares an attachment post object for JS, where it is expected 1225 1234 * to be JSON-encoded and fit into an Attachment model.