Created
May 19, 2010 19:45
-
-
Save tomedme/406757 to your computer and use it in GitHub Desktop.
Wordpress contact-form-7 jQuery 1.4.2 fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: includes/functions.php | |
=================================================================== | |
--- includes/functions.php (revision 243251) | |
+++ includes/functions.php (working copy) | |
@@ -125,6 +125,10 @@ | |
} | |
function wpcf7_json( $items ) { | |
+ | |
+ if (function_exists('json_encode')) | |
+ return json_encode( $items ); | |
+ | |
if ( is_array( $items ) ) { | |
if ( empty( $items ) ) | |
return 'null'; | |
Index: admin/admin.php | |
=================================================================== | |
--- admin/admin.php (revision 243251) | |
+++ admin/admin.php (working copy) | |
@@ -53,6 +53,9 @@ | |
} | |
$additional_settings = trim( $_POST['wpcf7-additional-settings'] ); | |
+ | |
+ if (function_exists('json_encode')) | |
+ $additional_settings = stripslashes($additional_settings); | |
$query = array(); | |
$query['message'] = ( $contact_form->initial ) ? 'created' : 'saved'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment