wp_save_post_revision_check_for_changes

wp_save_post_revision_check_for_changes

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('wp_save_post_revision_check_for_changes') is found 1 times:

  • /wp-includes/revision.php line 186
    		 *                                   Default true.
    		 * @param WP_Post $latest_revision   The latest revision post object.
    		 * @param WP_Post $post              The post object.
    		 */
    		if ( isset( $latest_revision ) && apply_filters( 'wp_save_post_revision_check_for_changes', true, $latest_revision, $post ) ) {
    			$post_has_changed = false;
    
    			foreach ( array_keys( _wp_post_revision_fields( $post ) ) as $field ) {
    				if ( normalize_whitespace( $post->$field ) !== normalize_whitespace( $latest_revision->$field ) ) {
    					$post_has_changed = true;
    					break;
    

See this hook used in plugins: