A fix for pipes' bug in
-
Hi Takayuki,
There is a fix for the bug encountered with pipes in options of select HTML element.
File: includes/shortcodes.php, block lines 138 to 148
if ( WPCF7_USE_PIPE ) { $pipes = new WPCF7_Pipes( $scanned_tag['raw_values'] ); $scanned_tag['labels'] = $pipes->collect_befores(); $scanned_tag['pipes'] = $pipes; $scanned_tag['values'] = $pipes->collect_afters(); } else { $scanned_tag['values'] = $scanned_tag['raw_values']; $scanned_tag['labels'] = $scanned_tag['values']; } //$scanned_tag['labels'] = $scanned_tag['values'];
The commented line can be deleted, it’s added to the “else” condition.
Thank to the documentation, labels collect the element before the pipe, and values have to be the element collected after the pipe.Thank you for your work!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘A fix for pipes' bug in’ is closed to new replies.