Change eregi and WPCF7_Shortcode
-
Since v4.6 Contact Form 7 class WPCF7_Shortcode is deprecated
please change line 70
$tags = new WPCF7_Shortcode( $tags );
to
$tags = new WPCF7_FormTag( $tags );
Since php 7.0 “eregi” removed
please change line 55
$expression = "^[a-z\'0-9]+([._-][a-z\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$";
to
$expression = "/^[a-z\'0-9]+([._-][a-z\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$/i";
and line 57
if (eregi($expression, $emailAddress)) {
to
if (preg_match($expression, $emailAddress)) {
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change eregi and WPCF7_Shortcode’ is closed to new replies.