Fix for WPML integration
-
Hi,
This is David from the WPML compatibility team. We are trying to use the ‘wpcf7_admin_misc_pub_section’ action to add language controls to the form editor.
In my tests it is working very well when we edit an existing form, but it’s not working properly when the form has just been created.
Edit existing form URL:
https://localhost/wp-admin/admin.php?page=wpcf7&post=16&action=editNewly added form URL:
https://localhost/wp-admin/admin.php?page=wpcf7&post=38&active-tab=0The newly added form is missing ‘action=edit’ in the URL and this is causing issues with WPML’s language metabox.
I’d like to suggest the following change to fix this:
diff --git a/admin/admin.php b/admin/admin.php index 4f3c2d9..a3aa76d 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -233,6 +233,7 @@ function wpcf7_load_contact_form_admin() { $query = array( 'post' => $contact_form ? $contact_form->id() : 0, + 'action' => 'edit', 'active-tab' => isset( $_POST['active-tab'] ) ? (int) $_POST['active-tab'] : 0, );
Would you accept such a change to give our shared users a better experience?
Let me know what you thinkThanks,
David García Watkins
WPML Compatibility Team
OnTheGoSystems
The makers of WPML, Toolset and ICanLocalize
- The topic ‘Fix for WPML integration’ is closed to new replies.