Version Description
Added ACFv4 support for qTranslate-X
Download this release
Release Info
Developer | funkjedi |
Plugin | ACF qTranslate |
Version | 1.6 |
Comparing to | |
See all releases |
Code changes from version 1.5 to 1.6
- acf-qtranslate.php +28 -1
- readme.txt +5 -2
- v4/assets/input.css +1 -0
acf-qtranslate.php
CHANGED
@@ -63,7 +63,6 @@ function acf_qtranslate_monkey_patches() {
|
|
63 |
}
|
64 |
|
65 |
|
66 |
-
|
67 |
function acf_qtranslate_get_visible_fields($args = false) {
|
68 |
global $post, $typenow;
|
69 |
if ($args === false) {
|
@@ -93,6 +92,34 @@ add_filter('qtranslate_load_admin_page_config', 'acf_qtranslate_load_admin_page_
|
|
93 |
function acf_qtranslate_load_admin_page_config($page_configs)
|
94 |
{
|
95 |
global $pagenow;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
switch ($pagenow) {
|
97 |
|
98 |
// add support for regular pages and posts
|
63 |
}
|
64 |
|
65 |
|
|
|
66 |
function acf_qtranslate_get_visible_fields($args = false) {
|
67 |
global $post, $typenow;
|
68 |
if ($args === false) {
|
92 |
function acf_qtranslate_load_admin_page_config($page_configs)
|
93 |
{
|
94 |
global $pagenow;
|
95 |
+
|
96 |
+
// very hacky support for v4
|
97 |
+
if (acf_qtranslate_acf_major_version() === 4) {
|
98 |
+
$args = array('post_id' => apply_filters('acf/get_post_id', false));
|
99 |
+
$match_field_groups = apply_filters('acf/location/match_field_groups', array(), $args);
|
100 |
+
$acfs = apply_filters('acf/get_field_groups', array());
|
101 |
+
if (is_array($acfs)) {
|
102 |
+
$field_ids = array();
|
103 |
+
foreach ($acfs as $acf) {
|
104 |
+
if (in_array($acf['id'], $match_field_groups)) {
|
105 |
+
$fields = apply_filters('acf/field_group/get_fields', array(), $acf['id']);
|
106 |
+
foreach ($fields as $field) {
|
107 |
+
$field_ids[] = array('id' => $field['id']);
|
108 |
+
}
|
109 |
+
}
|
110 |
+
}
|
111 |
+
if (count($field_ids)) {
|
112 |
+
$page_configs[] = array(
|
113 |
+
'pages' => array('' => ''),
|
114 |
+
'forms' => array(
|
115 |
+
array('fields' => $field_ids)
|
116 |
+
));
|
117 |
+
}
|
118 |
+
}
|
119 |
+
return $page_configs;
|
120 |
+
}
|
121 |
+
|
122 |
+
|
123 |
switch ($pagenow) {
|
124 |
|
125 |
// add support for regular pages and posts
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: funkjedi
|
|
3 |
Tags: acf, advanced custom fields, qtranslate, add-on, admin
|
4 |
Requires at least: 3.0.0
|
5 |
Tested up to: 4.1.1
|
6 |
-
Version: 1.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -48,6 +48,9 @@ The plugin is based on code samples posted to the [ACF support forums](http://ol
|
|
48 |
|
49 |
== Changelog ==
|
50 |
|
|
|
|
|
|
|
51 |
= 1.5 =
|
52 |
Added support for qTranslate-X
|
53 |
Remove ACFv5 WYSIWYG implementation as it was very broken
|
3 |
Tags: acf, advanced custom fields, qtranslate, add-on, admin
|
4 |
Requires at least: 3.0.0
|
5 |
Tested up to: 4.1.1
|
6 |
+
Version: 1.6
|
7 |
+
Stable tag: 1.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
48 |
|
49 |
== Changelog ==
|
50 |
|
51 |
+
= 1.6 =
|
52 |
+
Added ACFv4 support for qTranslate-X
|
53 |
+
|
54 |
= 1.5 =
|
55 |
Added support for qTranslate-X
|
56 |
Remove ACFv5 WYSIWYG implementation as it was very broken
|
v4/assets/input.css
CHANGED
@@ -26,6 +26,7 @@
|
|
26 |
position: relative;
|
27 |
top: 1px;
|
28 |
z-index: 100;
|
|
|
29 |
}
|
30 |
|
31 |
.multi-language-field input,
|
26 |
position: relative;
|
27 |
top: 1px;
|
28 |
z-index: 100;
|
29 |
+
float: right;
|
30 |
}
|
31 |
|
32 |
.multi-language-field input,
|