Skip to content

Commit

Permalink
v2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aurovrata committed Mar 13, 2022
1 parent 6642e35 commit 3fb876a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion 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.8.3
Tested up to: 5.9.2
Stable tag: trunk
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -147,6 +147,7 @@ this filter should be used by plugin developers to ensure their plugin translati
== Changelog ==
= 2.4.1 =
* fix language update.
* 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
3 changes: 2 additions & 1 deletion admin/class-cf7-polylang-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function admin_notices(){

$notices = get_option('cf7-polylang-admin-notices', array());
if(empty($notices)) return;

// debug_msg($notices, "pagenow: $pagenow");
if(!isset($notices[$pagenow])) return;

foreach($notices[$pagenow] as $key=>$notice){
Expand All @@ -86,6 +86,7 @@ public function admin_notices(){
case $key==='any':
case $key==='polylang':
$dismiss = $notice['nonce'].'-forever';
// debug_msg($notice,"notice -> $key");
if ( ! PAnD::is_admin_notice_active( $dismiss ) ) {
unset($notices[$pagenow]);
update_option('cf7-polylang-admin-notices', $notices);
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.0
* Version: 2.4.1
* 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.0' );
define( 'CF7_POLYLANG_VERSION', '2.4.1' );
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-cf7-polylang-activator.php
Expand Down
5 changes: 3 additions & 2 deletions includes/class-cf7-polylang-activator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public static function activate() {
if(!is_plugin_active( 'contact-form-7/wp-contact-form-7.php' )){
exit(__('This plugin requires the Contact Form 7 plugin to be installed first', 'cf7-polylang'));
}

if(!is_plugin_active( 'cf7-grid-layout/cf7-grid-layout.php' )){
/**
*@since 2.1.0
Expand All @@ -50,10 +49,12 @@ public static function activate() {
$notice = array(
'nonce'=>$nonce,
'type'=>'notice-warning',
'msg'=> __('Contact Form 7 Polylang extension <strong>WARNING</strong>: due to the evolution of Polylang plugin, and non-WP standard coded CF7 plugin, this plugin is now an extension of the <a href="https://wordpress.org/plugins/cf7-grid-layout/">CF7 Smart Grid-layout</a> plugin.<br /> Please install it to get the full functionality of PolyLang in CF7 admin pages. If you choose not to install it, your existing forms will continue to work, but you will not be able to create <em>new translations</em>. More information on the plugin <a href="https://wordpress.org/plugins/cf7-polylang/">page</a>.', 'cf7-polylang')
'msg'=> __('Contact Form 7 Polylang extension <strong>WARNING</strong>: due to the evolution of Polylang plugin, and non-WP standard coded CF7 plugin, this plugin is now an extension of the <a href="https://wordpress.org/plugins/cf7-grid-layout/">CF7 Smart Grid-layout</a> plugin.<br /> Please install it to get the full functionality of PolyLang in CF7 admin pages. If you choose <strong>not</strong> to install it, your existing forms will continue to work, but you will not be able to create <em>new translations</em>. More information on the plugin <a href="https://wordpress.org/plugins/cf7-polylang/">page</a>.', 'cf7-polylang')
);
$notices['admin.php']['page=wpcf7']=$notice;
$notices['plugins.php']['any']=$notice;
$notices['post-new.php']['post_type=wpcf7_contact_form']=$notice;
// debug_msg($notices, 'setting up notices ');
}
//is polylang installed?
if(!defined ("POLYLANG_VERSION") ){
Expand Down

0 comments on commit 3fb876a

Please sign in to comment.