Skip to content

omnisend/wp-omnisend-contact-form-7

Repository files navigation

wp-omnisend-contact-form-7

Plugin for Contact Form 7 WordPress plugin. More information can be found here.

https://contactform7.com/2020/07/28/accessing-user-input-data/

Key class

  • WPCF7_Service - integration should implement class and be added to WPCF7_Integration with add_service to be displayed in integration list

Contact form 7 actions

  • wpcf7_init Plugin initiated. Register Omnisend service.
  • wpcf7_submit Website user submitted form. Check and send contact to Omnisend.
  • wpcf7_save_contact_form Admin user saved/modified form - save Omnisend related data to form.

Contact form 7 filters

  • wpcf7_editor_panels Add Omnisend configuration panel for selected form.
  • wpcf7_pre_construct_contact_form_properties Constructs contact form properties. This is called only once from the constructor.

PHP Linting

WordPress.org team mandates our plugin to be linted against WordPress coding standards.

After each push to any branch PHP Standards action will run and all the PHP code will be linted. See action output for results.

Linting locally

Tools needed:

After installing those tools one can run in local plugin dir (omnisend-for-contact-form-7) helper script:

./lint.sh check
./lint.sh fix

or all commands manually. Following commands

composer update
composer install

install linting tool and standards. And then actual linting phpcs script can be initiated with

./vendor/squizlabs/php_codesniffer/bin/phpcs --ignore=.js --standard=WordPress omnisend-connect

A second phpcbf script can be run to automatically correct coding standard violations:

./vendor/squizlabs/php_codesniffer/bin/phpcbf --ignore=.js --standard=WordPress omnisend-connect