Adding shortcode for case-insensitive url param extraction
-
Hi and thanks for this awesome plugin!
Saved me hours!
Please 2 suggestions:
1. adding ability to add onclick JS to fields
2. adding shortcode for case-insensitive url param extraction
I needed badly to make it case insensitive immediately, so changed the code myself, which is of course bad, as it it will be overridden with next version ??
Here is what I did:
/* Insert a $_GET variable */ function cf7_get($atts){ extract(shortcode_atts(array( 'key' => 0, ), $atts)); $value = ''; // make it case insensitive $_GET_lower = array_change_key_case($_GET, CASE_LOWER); $key = strtolower( $key ); if( isset( $_GET_lower[$key] ) ){ $value = urldecode($_GET_lower[$key]); } return $value; }
Thanks!
Yosi
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding shortcode for case-insensitive url param extraction’ is closed to new replies.