If you're interested in becoming a maintainer please let me know.
This plugin gives you an ability to easily accept, moderate and publish user generated content (currently, there are 3 modes: media, post, post + media). The plugin allows you to create a front end form with multiple fields (easily customizable with shortcodes). You can limit which MIME-types are supported for each field. All of the submissions are safely held for moderation in Media/Post/Custom Post Types menu under a special tab "Manage UGC". Review, moderate and publish. It's that easy!
git clone https://github.com/rinatkhaziev/wp-frontend-uploader.gitin your WP plugins directory- Activate the plugin
- Set the settings
- Enjoy
- Pull as usual
- ...
- Profit
Miss a feature? Pull requests are welcome.
You can use wp-env to start a local WordPress site with this plugin mounted and activated.
Before starting, make sure Node.js and Docker with the Compose plugin are available. Docker Desktop includes Docker Compose. Confirm that Docker is running and Compose can be found:
docker compose versionThen, from this repository, run:
npx --yes --package=@wordpress/env wp-env startwp-env selects an available port and prints the local site URL. You can also display it with:
npx --yes --package=@wordpress/env wp-env statusAutomated tests use a separate wp-env configuration and database, so they do not reset the development site. Start the test environment:
npx --yes --package=@wordpress/env wp-env --config=.wp-env.phpunit.json startInstall the PHP test dependencies inside the test environment:
npx --yes --package=@wordpress/env wp-env --config=.wp-env.phpunit.json run cli --env-cwd=wp-content/plugins/wp-frontend-uploader composer installRun the syntax checks and PHPUnit suite:
npx --yes --package=@wordpress/env wp-env --config=.wp-env.phpunit.json run cli --env-cwd=wp-content/plugins/wp-frontend-uploader composer testStop the test environment when you are finished:
npx --yes --package=@wordpress/env wp-env --config=.wp-env.phpunit.json stopSign in with username admin and password password, then smoke-test the plugin:
- Review the plugin options under Settings > Frontend Uploader Settings.
- Create a page containing the
[fu-upload-form]shortcode. - View the page and submit an allowed image.
- Review the submission under Media > Manage UGC.
Stop the environment without deleting its data:
npx --yes --package=@wordpress/env wp-env stopTo remove the development environment and its local WordPress data completely, run npx --yes --package=@wordpress/env wp-env destroy.