Changeset 57238
- Timestamp:
- 01/03/2024 04:20:02 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r56749 r57238 3080 3080 } 3081 3081 3082 $previous_status = $post->post_status; 3083 3082 3084 /** This filter is documented in wp-includes/post.php */ 3083 $check = apply_filters( 'pre_trash_post', null, $post );3085 $check = apply_filters( 'pre_trash_post', null, $post, $previous_status ); 3084 3086 if ( null !== $check ) { 3085 3087 return $check; … … 3087 3089 3088 3090 /** This action is documented in wp-includes/post.php */ 3089 do_action( 'wp_trash_post', $post_id );3090 3091 add_post_meta( $post_id, '_wp_trash_meta_status', $p ost->post_status );3091 do_action( 'wp_trash_post', $post_id, $previous_status ); 3092 3093 add_post_meta( $post_id, '_wp_trash_meta_status', $previous_status ); 3092 3094 add_post_meta( $post_id, '_wp_trash_meta_time', time() ); 3093 3095 3094 $old_status = $post->post_status;3095 3096 $new_status = 'trash'; 3096 3097 $wpdb->update( $wpdb->posts, array( 'post_status' => $new_status ), array( 'ID' => $post->ID ) ); … … 3098 3099 3099 3100 $post->post_status = $new_status; 3100 wp_transition_post_status( $new_status, $ old_status, $post );3101 wp_transition_post_status( $new_status, $previous_status, $post ); 3101 3102 3102 3103 /** This action is documented in wp-includes/post.php */ … … 3120 3121 3121 3122 /** This action is documented in wp-includes/post.php */ 3122 do_action( 'trashed_post', $post_id );3123 do_action( 'trashed_post', $post_id, $previous_status ); 3123 3124 3124 3125 return $post;
Note: See TracChangeset
for help on using the changeset viewer.