Skip to content

Commit

Permalink
v2.5rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
aurovrata committed May 15, 2022
1 parent 3fb876a commit 1991552
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
7 changes: 5 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: polylang, contact form 7, multisite, contact form 7 extension, contact form 7 module, multilingual contact form 7, multilingual form, cf7 smart grid extension
Requires at least: 4.7
Requires PHP: 5.6
Tested up to: 5.9.2
Tested up to: 6.0
Stable tag: trunk
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -145,9 +145,12 @@ this filter should be used by plugin developers to ensure their plugin translati
4. Ensure you enable translations for Contact Forms in your Polyland settings.

== Changelog ==
== 2.5.0 ==
* introduce 'cf7pll_sync_form_metakeys' to filter the synchronised form metakeys between translations.
* improve translation sync from original post.
= 2.4.1 =
* fix language update.
* add notice to post-new pages.
* add notice to post-new pages.
= 2.4.0 =
* enable other plugins to add their translation files.
* added 'cf7pll_load_plugin_translation_resource' filter.
Expand Down
14 changes: 11 additions & 3 deletions admin/class-cf7-polylang-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,17 +421,25 @@ public function new_polylang_locale_added( $term_id, $tt_id, $taxonomy ){
}
/**
* Stop polylang synchronising form meta fields.
*
* hooked to 'pll_copy_post_metas'
* @since 1.4.3
* @param array $keys meta fields to be synched .
* @param boolean $sync if synchorinsation is enabled .
* @param string $post_id post id from which to copy meta fields .
* @return array filtered meta fields to be synched.
**/
public function polylang_meta_fields_sync($keys, $sync, $post_id){
if(!$sync) return $keys;
debug_msg("duplicating...$post_id/$sync");
if('wpcf7_contact_form' != get_post_type($post_id)) return $keys;
else return array(); //don't sync any cf7 meta fields
else { /** @since 2.5.0 let's sync settings, form, and other props from cf7sg */
$form = wpcf7_contact_form($post_id);
$props = array();
foreach($form->get_properties() as $prop){
array_push($props, "_{$prop}");
}
$keys = array_merge($keys, Cf7_Grid_Layout_Admin::METAKEYS, $props);
return apply_filters('cf7pll_sync_form_metakeys',$keys, get_cf7form_key($post_id), $post_id);
}
}
/**
* Fix for special email tag [_site_url].
Expand Down
4 changes: 2 additions & 2 deletions cf7-polylang.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: Contact Form 7 Polylang extension
* Plugin URI: http://wordpress.syllogic.in
* Description: This plugin extends <a target="_blank" href="https://wordpress.org/plugins/contact-form-7/">Contact Form 7</a> plugin to manage multiple language forms using the <a target="_blank" href="https://wordpress.org/plugins/polylang/">PolyLang</a> plugin. It Requires both plugins to be active first.
* Version: 2.4.1
* Version: 2.5.0rc1
* Author: Aurovrata V.
* Author URI: http://syllogic.in
* License: GPL-2.0+
Expand All @@ -30,7 +30,7 @@
die;
}
define( 'CF7_POLYLANG_PATH', plugin_dir_path( __FILE__ ) );
define( 'CF7_POLYLANG_VERSION', '2.4.1' );
define( 'CF7_POLYLANG_VERSION', '2.5.0rc1' );
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-cf7-polylang-activator.php
Expand Down

0 comments on commit 1991552

Please sign in to comment.