oxess/wp-bootstrap-wpcf7

There is no license information available for the latest version (dev-master) of this package.

Implements bootstrap class from in wordpress contact form 7

dev-master 2017-05-02 20:44 UTC

This package is not auto-updated.

Last update: 2025-07-05 02:57:43 UTC


README

How it's works?

This is easy, contact form 7 use a wordpress filters as every good wrote plugin in wordpress. This script create a filter & looking for inputs, in render html, and add class form-control to find inputs. It's all.

install:

  • Add as composer dependences:
composer require oxess/wp-bootstrap-wpcf7
  • Init in wordpress theme :
# functions.php
Ox_Bootstrap_WPCF7::init( [] );

Examples:

  • Simple use:
# functions.php
Ox_Bootstrap_WPCF7::init( [] );
  • With change submit css class
# functions.php
Ox_Bootstrap_WPCF7::init( [
    'class__for' => array(
        'submit' => 'btn btn-default'
    )
] );

Configuration:

$cfg = array(
    'delimiter'     => ';',
    'priority'      => 99,
    'class__for'    => array(
        'input'    => 'form-control',
        'select'   => 'form-control',
        'textarea' => 'form-control',
        'submit'   => 'btn btn-primary',
    ),
)