web/wp-content/plugins/caldera-forms/classes/forms.php
/**
	 * Delete form revisions if there are more than the max revisions
	 *
	 *
	 * @since 1.5.3
	 *
	 * @param array $form Form config
	 */
Delete form revisions if there are more than the max revisions
@since 1.5.3

@param array $form Form config
Delete form revisions if there are more than the max revisions @since 1 . 5 . 3 @param array $form Form config
protected static function maybe_delete_old_revisions( array  $form ){
		$revisions = self::get_revisions( $form[ 'ID' ], true);
		if( ! empty( $revisions ) ) {
			$max_revisions = self::max_revisions( $form );
			if( $max_revisions < count( $revisions ) ){
				sort( $revisions );
				$deletes = array();
				foreach ( $revisions as $key => $id ){
					if( $key + 1 < $max_revisions ){
						$deletes[] = $id;
					}
				}
				Caldera_Forms_DB_Form::get_instance()->delete( $deletes );
			}
		}
	}
protected static function maybe_delete_old_revisions ( array $ form ) { $ revisions = self :: get_revisions ( $ form [ 'ID' ] , true ) ; if ( ! empty ( $ revisions ) ) { $ max_revisions = self :: max_revisions ( $ form ) ; if ( $ max_revisions < count ( $ revisions ) ) { sort ( $ revisions ) ; $ deletes = array ( ) ; foreach ( $ revisions as $ key => $ id ) { if ( $ key + 1 < $ max_revisions ) { $ deletes [ ] = $ id ; } } Caldera_Forms_DB_Form :: get_instance ( ) -> delete ( $ deletes ) ; } } }
Delete form revisions if there are more than the max revisions
 @since 1.5.3
Delete form revisions if there are more than the max revisions @since 1 . 5 . 3