Skip to content

Implements bootstrap class from in wordpress contact form 7

Notifications You must be signed in to change notification settings

oxess/wp-bootstrap-wpcf7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

wp-bootstrap-wpcf7

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',
    ),
)

About

Implements bootstrap class from in wordpress contact form 7

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages