ACF qTranslate - Version 1.7.15

Version Description

  • Core: Display LSB on ACF Option pages
Download this release

Release Info

Developer funkjedi
Plugin Icon wp plugin ACF qTranslate
Version 1.7.15
Comparing to
See all releases

Code changes from version 1.7.14 to 1.7.15

acf-qtranslate.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Advanced Custom Fields: qTranslate
4
  Plugin URI: http://github.com/funkjedi/acf-qtranslate
5
  Description: Provides multilingual versions of the text, text area, and wysiwyg fields.
6
- Version: 1.7.14
7
  Author: funkjedi
8
  Author URI: http://funkjedi.com
9
  License: GPLv2 or later
3
  Plugin Name: Advanced Custom Fields: qTranslate
4
  Plugin URI: http://github.com/funkjedi/acf-qtranslate
5
  Description: Provides multilingual versions of the text, text area, and wysiwyg fields.
6
+ Version: 1.7.15
7
  Author: funkjedi
8
  Author URI: http://funkjedi.com
9
  License: GPLv2 or later
assets/acf_4/qtranslatex.js CHANGED
@@ -9,12 +9,6 @@ jQuery(window).load(function() {
9
  // Enable the language switching buttons
10
  qTranslateConfig.qtx.enableLanguageSwitchingButtons('block');
11
 
12
- // Add display hooks to ACF metaboxes
13
- jQuery('.acf_postbox h3 span').each(function() {
14
- this.id = _.uniqueId('acf-postbox-h3-span');
15
- qTranslateConfig.qtx.addDisplayHookById(this.id);
16
- });
17
-
18
 
19
  // Ensure that translation of standard field types is enabled
20
  if (!window.acf_qtranslate_translate_standard_field_types) {
9
  // Enable the language switching buttons
10
  qTranslateConfig.qtx.enableLanguageSwitchingButtons('block');
11
 
 
 
 
 
 
 
12
 
13
  // Ensure that translation of standard field types is enabled
14
  if (!window.acf_qtranslate_translate_standard_field_types) {
assets/acf_5/qtranslatex.js CHANGED
@@ -18,12 +18,6 @@
18
  // Enable the language switching buttons
19
  qTranslateConfig.qtx.enableLanguageSwitchingButtons('block');
20
 
21
- // Add display hooks to ACF metaboxes
22
- jQuery('.acf-postbox h3 span').each(function() {
23
- this.id = _.uniqueId('acf-postbox-h3-span');
24
- qTranslateConfig.qtx.addDisplayHookById(this.id);
25
- });
26
-
27
 
28
  // Ensure that translation of standard field types is enabled
29
  if (!window.acf_qtranslate_translate_standard_field_types) {
18
  // Enable the language switching buttons
19
  qTranslateConfig.qtx.enableLanguageSwitchingButtons('block');
20
 
 
 
 
 
 
 
21
 
22
  // Ensure that translation of standard field types is enabled
23
  if (!window.acf_qtranslate_translate_standard_field_types) {
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: funkjedi
3
  Tags: acf, advanced custom fields, qtranslate, add-on, admin
4
  Requires at least: 3.5.0
5
- Tested up to: 4.2.1
6
- Version: 1.7.14
7
- Stable tag: 1.7.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,6 +59,9 @@ The plugin is based on code samples posted to the ACF support forums by taeo bac
59
 
60
  == Changelog ==
61
 
 
 
 
62
  = 1.7.14 =
63
  * Bug Fix: Bumped `after_setup_theme` priority to fix ACF4 field inclusion
64
 
2
  Contributors: funkjedi
3
  Tags: acf, advanced custom fields, qtranslate, add-on, admin
4
  Requires at least: 3.5.0
5
+ Tested up to: 4.6.1
6
+ Version: 1.7.15
7
+ Stable tag: 1.7.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
59
 
60
  == Changelog ==
61
 
62
+ = 1.7.15 =
63
+ * Core: Display LSB on ACF Option pages
64
+
65
  = 1.7.14 =
66
  * Bug Fix: Bumped `after_setup_theme` priority to fix ACF4 field inclusion
67
 
src/plugin.php CHANGED
@@ -19,6 +19,7 @@ class acf_qtranslate_plugin {
19
  add_action('admin_menu', array($this, 'admin_menu'));
20
  add_action('admin_init', array($this, 'admin_init'));
21
 
 
22
  add_filter('plugin_action_links_' . plugin_basename(ACF_QTRANSLATE_PLUGIN), array($this, 'plugin_action_links'));
23
  }
24
 
@@ -174,6 +175,34 @@ class acf_qtranslate_plugin {
174
  return $links;
175
  }
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  /**
178
  * Retrieve the value of a plugin setting.
179
  */
19
  add_action('admin_menu', array($this, 'admin_menu'));
20
  add_action('admin_init', array($this, 'admin_init'));
21
 
22
+ add_filter('qtranslate_load_admin_page_config', array($this, 'qtranslate_load_admin_page_config'));
23
  add_filter('plugin_action_links_' . plugin_basename(ACF_QTRANSLATE_PLUGIN), array($this, 'plugin_action_links'));
24
  }
25
 
175
  return $links;
176
  }
177
 
178
+ /**
179
+ * Enable the display of the LSB on ACF Options pages.
180
+ * @param array
181
+ * @return array
182
+ */
183
+ public function qtranslate_load_admin_page_config($config)
184
+ {
185
+ $config['acf-options-page'] = array(
186
+ 'pages' => array('admin.php' => 'page='),
187
+ 'anchors' => array('poststuff' => array('where' => 'first last')),
188
+ 'forms' => array(
189
+ 'post' => array(
190
+ 'fields' => array(
191
+ 'acf4-field-group-hX' => array(
192
+ 'jquery' => '.acf_postbox h2 span,.acf_postbox h3 span',
193
+ 'encode' => 'display',
194
+ ),
195
+ 'acf5-field-group-hX' => array(
196
+ 'jquery' => '.acf-postbox h2 span,.acf-postbox h3 span',
197
+ 'encode' => 'display',
198
+ ),
199
+ )),
200
+ ),
201
+ );
202
+
203
+ return $config;
204
+ }
205
+
206
  /**
207
  * Retrieve the value of a plugin setting.
208
  */