Changeset 58961 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 08/31/2024 02:44:50 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r58419 r58961 2006 2006 2007 2007 /** 2008 * Autosave the revisioned meta fields.2008 * Autosaves the revisioned meta fields. 2009 2009 * 2010 2010 * Iterates through the revisioned meta fields and checks each to see if they are set, … … 2028 2028 2029 2029 /* 2030 * Go thr u the revisioned meta keys and save them as part of the autosave, if2031 * the meta key is part of the posted data, the meta value is not blank and2032 * thethe meta value has changes from the last autosaved value.2030 * Go through the revisioned meta keys and save them as part of the autosave, 2031 * if the meta key is part of the posted data, the meta value is not blank, 2032 * and the meta value has changes from the last autosaved value. 2033 2033 */ 2034 2034 foreach ( wp_post_revision_meta_keys( $post_type ) as $meta_key ) { 2035 2035 2036 if ( 2037 isset( $posted_data[ $meta_key ] ) && 2038 get_post_meta( $new_autosave['ID'], $meta_key, true ) !== wp_unslash( $posted_data[ $meta_key ] ) 2036 if ( isset( $posted_data[ $meta_key ] ) 2037 && get_post_meta( $new_autosave['ID'], $meta_key, true ) !== wp_unslash( $posted_data[ $meta_key ] ) 2039 2038 ) { 2040 2039 /* … … 2045 2044 delete_metadata( 'post', $new_autosave['ID'], $meta_key ); 2046 2045 2047 /* 2048 * One last check to ensure meta value not empty(). 2049 */ 2046 // One last check to ensure meta value is not empty. 2050 2047 if ( ! empty( $posted_data[ $meta_key ] ) ) { 2051 /* 2052 * Add the revisions meta data to the autosave. 2053 */ 2048 // Add the revisions meta data to the autosave. 2054 2049 add_metadata( 'post', $new_autosave['ID'], $meta_key, $posted_data[ $meta_key ] ); 2055 2050 }
Note: See TracChangeset
for help on using the changeset viewer.