https://github.com/wp-digital/wpforms-uploads-path-filter
https://github.com/wp-digital/wpforms-uploads-path-filter
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wp-digital/wpforms-uploads-path-filter
- Owner: wp-digital
- Created: 2022-05-17T12:45:49.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-22T17:40:02.000Z (over 3 years ago)
- Last Synced: 2025-08-07T22:41:46.464Z (10 months ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WPforms files fix for Innocode server setup
### Description
1. Add `wpforms_upload_root` hook to change default wpforms plugin uploads folder
2. Disable [S3-Uploads](https://github.com/humanmade/S3-Uploads) plugin path replace for wpforms submit process
Requires to setup persistant folder on the server.
Default path:
```
trailingslashit(WP_CONTENT_DIR) . 'wpforms'
```
### Install
- Preferable way is to use [Composer](https://getcomposer.org/):
````
composer require innocode-digital/wpforms-uploads-path-filter
````
By default it will be installed as [Must Use Plugin](https://codex.wordpress.org/Must_Use_Plugins).
But it's possible to control with `extra.installer-paths` in `composer.json`.
- Alternate way is to clone this repo to `wp-content/mu-plugins/` :
````
cd wp-content/mu-plugins/
git clone git@github.com:innocode-digital/wpforms-uploads-path-filter.git
````
### Usage
Add required constant (usually to `wp-config.php`):
````
define( 'INNOCODE_WPFORMS_UPLOADS_PATH', '' ); // E.g. "trailingslashit(WP_CONTENT_DIR) . 'wpforms'"
````