Changeset 30091 for trunk/src/wp-includes/revision.php
- Timestamp:
- 10/29/2014 07:01:15 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/revision.php
r28976 r30091 134 134 } 135 135 } 136 137 /** 138 * Filter whether a post has changed. 139 * 140 * By default a revision is saved only if one of the revisioned fields has changed. 141 * This filter allows for additional checks to determine if there were changes. 142 * 143 * @since 4.1.0 144 * 145 * @param bool $post_has_changed Whether the post has changed. 146 * @param WP_Post $last_revision The the last revision post object. 147 * @param WP_Post $post The post object. 148 * 149 */ 150 $post_has_changed = (bool) apply_filters( 'wp_save_post_revision_post_has_changed', $post_has_changed, $last_revision, $post ); 151 136 152 //don't save revision if post unchanged 137 if( ! $post_has_changed ) 153 if( ! $post_has_changed ) { 138 154 return; 155 } 139 156 } 140 157 }
Note: See TracChangeset
for help on using the changeset viewer.