Changeset 47909
- Timestamp:
- 06/04/2020 02:58:58 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/media.php
r47808 r47909 3725 3725 $result = $wpdb->query( "UPDATE $wpdb->posts SET post_parent = 0 WHERE post_type = 'attachment' AND ID IN ( $ids_string )" ); 3726 3726 } 3727 3727 } 3728 3729 if ( isset( $result ) ) { 3728 3730 foreach ( $ids as $att_id ) { 3731 /** 3732 * Fires when media is attached/detached from a post. 3733 * 3734 * @since 5.5 3735 * 3736 * @param string $action Attach/detach action. 3737 * @param int $att_id The attachment ID. 3738 * @param int $parent_id Attachment parent ID. 3739 */ 3740 do_action( 'wp_media_attach_action', $action, $att_id, $parent_id ); 3741 3729 3742 clean_attachment_cache( $att_id ); 3730 3743 } 3731 } 3732 3733 if ( isset( $result ) ) { 3744 3734 3745 $location = 'upload.php'; 3735 3746 $referer = wp_get_referer();
Note: See TracChangeset
for help on using the changeset viewer.