felixarntz / bootstrap-for-contact-form-7

This plugin modifies the output of the popular Contact Form 7 plugin to be styled in compliance with themes using the Bootstrap CSS framework.
https://wordpress.org/plugins/bootstrap-for-contact-form-7/
GNU General Public License v2.0
24 stars 18 forks source link

Fix for tabindex never getting set from shortcode #33

Closed jurasky closed 8 years ago

jurasky commented 8 years ago

Setting tabindex in the WPCF7 shortcode doesn't work with this plugin enabled. It does work with just the WPCF7 plugin.

Example: [text* name tabindex:5]Name[/text*] should output <input name="name" tabindex="5" .../>

PHP's is_int() only returns true if the value is specifically an integer. It will always return false for a string value, even if that value is numeric. This pull request forces the value of $tabindex to be an integer if it is parsed as a numeric string.

felixarntz commented 8 years ago

Good catch! Thanks for the PR!