From cb9de6e335fd4ddc9871ce7fddea724ed9bedc28 Mon Sep 17 00:00:00 2001 From: aurovrata Date: Wed, 1 Feb 2017 13:01:41 +0530 Subject: [PATCH] bug fixes changes in polylang changed in cf7 --- README.txt | 9 ++++++--- admin/cf7-post-admin-table.php | 1 + admin/class-cf7-polylang-admin.php | 6 +++++- cf7-polylang.php | 2 +- includes/class-cf7-polylang.php | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.txt b/README.txt index aa8356d..beb6225 100755 --- a/README.txt +++ b/README.txt @@ -3,8 +3,8 @@ Contributors: aurovrata Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Z83ZQ2ARSZPC8 Tags: polylang, contact form 7, multisite, contact form 7 extension, contact form 7 module, multilingual contact form 7 Requires at least: 3.0.1 -Tested up to: 4.6.1 -Stable tag: 1.2.8 +Tested up to: 4.7.1 +Stable tag: 1.2.9 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -91,8 +91,11 @@ echo do_shortcode('[contact-form-7 id=”'.$form_id.'″]'); 4. There is a bug in the integration which fails to pick the fact that language options have been saved. So even after click the 'Save' button you will see the familiar alert window popup, you can safely ignore the message. == Changelog == + += 1.2.9 = +* bug fix due to POLYLANG_URL constant missing in new version of polylang = 1.2.8 = -* bug fix on font-end enable user login pages reported by @Zelester +* bug fix on front-end enable user login pages reported by @Zelester = 1.2.7 = * bug fix on new polylang locale being added. diff --git a/admin/cf7-post-admin-table.php b/admin/cf7-post-admin-table.php index 8dfa4b6..1991680 100644 --- a/admin/cf7-post-admin-table.php +++ b/admin/cf7-post-admin-table.php @@ -88,6 +88,7 @@ public function change_add_new_button() { 'use strict'; $(document).ready(function() { $('h1 > a.page-title-action').attr('href',''); + $('h1 ~ a.page-title-action').attr('href',''); }); })( jQuery ); diff --git a/admin/class-cf7-polylang-admin.php b/admin/class-cf7-polylang-admin.php index 24fc1b5..83cc810 100755 --- a/admin/class-cf7-polylang-admin.php +++ b/admin/class-cf7-polylang-admin.php @@ -105,7 +105,11 @@ public function enqueue_scripts() { //enqueue de polylang scripts needed for this to work global $polylang; $polylang->admin_enqueue_scripts(); - wp_enqueue_script( 'pll_post', POLYLANG_URL .'/js/post.min.js', array( 'jquery', 'wp-ajax-response', 'post', 'jquery-ui-autocomplete' ), POLYLANG_VERSION, true ); + if( file_exists(ABSPATH .'wp-cotent/plugins/polylang/js/post.min.js') ){ + wp_enqueue_script( 'pll_post', content_url('/plugins/polylang/js/post.min.js'), array( 'jquery', 'wp-ajax-response', 'post', 'jquery-ui-autocomplete' ), POLYLANG_VERSION, true ); + }else{ + wp_enqueue_script( 'pll_post', content_url('/plugins/polylang-pro/js/post.min.js'), array( 'jquery', 'wp-ajax-response', 'post', 'jquery-ui-autocomplete' ), POLYLANG_VERSION, true ); + } } } diff --git a/cf7-polylang.php b/cf7-polylang.php index 2189304..0dc7508 100755 --- a/cf7-polylang.php +++ b/cf7-polylang.php @@ -16,7 +16,7 @@ * Plugin Name: Contact Form 7 Polylang extension * Plugin URI: http://wordpress.syllogic.in * Description: This plugin extends Contact Form 7 plugin to manage multiple language forms using the PolyLang plugin. It Requires both plugins to be active first. - * Version: 1.2.8 + * Version: 1.2.9 * Author: Aurovrata V. * Author URI: http://syllogic.in * License: GPL-2.0+ diff --git a/includes/class-cf7-polylang.php b/includes/class-cf7-polylang.php index 0b26dbe..1bb0a57 100755 --- a/includes/class-cf7-polylang.php +++ b/includes/class-cf7-polylang.php @@ -69,7 +69,7 @@ class Cf7_Polylang { public function __construct() { $this->plugin_name = 'cf7-polylang'; - $this->version = '1.2.8'; + $this->version = '1.2.9'; $this->load_dependencies(); $this->set_locale();