# wp-stateless/3.0.1/lib/classes/compatibility/wpforms.php

WP-Stateless – Google Cloud Storage, version 3.0.1. 34 lines.

- Page: https://pluginprobe.com/plugins/wp-stateless/3.0.1/code/lib/classes/compatibility/wpforms.php
- Raw: https://pluginprobe.com/plugins/wp-stateless/3.0.1/raw/lib/classes/compatibility/wpforms.php
- Modified: 2020-09-15T15:03:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-stateless/3.0.1/code/lib/classes/compatibility/wpforms.php#L10-L20`.

```php
<?php
/**
 * Plugin Name: Contact Form by WPForms – Drag & Drop Form Builder for WordPress
 * Plugin URI: https://wordpress.org/plugins/wpforms-lite/
 *
 * Compatibility Description: Ensures compatibility with WPForms.
 *
 */

namespace wpCloud\StatelessMedia {

    if(!class_exists('wpCloud\StatelessMedia\WPForms')) {
        
        class WPForms extends ICompatibility {
            protected $id = 'wpforms';
            protected $title = 'WPForms';
            protected $constant = 'WP_STATELESS_COMPATIBILITY_WPFORMS';
            protected $description = 'Ensures compatibility with WPForms.';
            protected $plugin_file = ['wpforms-lite/wpforms.php', 'wpforms/wpforms.php'];

            public function module_init($sm){
                // exclude randomize_filename from wpforms page
                if(!empty($_GET['page']) && $_GET['page'] == 'wpforms-builder') {
                    remove_filter( 'sanitize_file_name', array( "wpCloud\StatelessMedia\Utility", 'randomize_filename' ), 10 );
                }
                
            }

        }

    }

}

```
