Skip to content

Commit db21438

Browse files
committed
Core component : remove Polylang ACF instruction field (added in Polylang 3.7)
1 parent a1c98dd commit db21438

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

README.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ click on "Create new translation" at the bottom/left of this window.
3131

3232
== Changelog ==
3333

34-
= 0.1.3 =
34+
= 0.1.4 =
3535

36-
* Remove Auto Sizes for Lazy Loaded Image in Wordpress (added in WP 6.7)
36+
* Core component : remove Polylang ACF instruction field (added in Polylang 3.7)
3737

38-
= 0.1.2 =
38+
= 0.1.3 =
39+
40+
* Core component : remove Auto Sizes for Lazy Loaded Image in Wordpress (added in WP 6.7)
41+
42+
= 0.1.2 =
3943

4044
* Block Visibility : Define more default settings values and deregister screen_size inline css.
4145

core/core.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

33
// Remove Auto Sizes for Lazy Loaded Image in Wordpress (added in WP 6.7)
4-
// https://make.wordpress.org/core/2024/10/18/auto-sizes-for-lazy-loaded-images-in-wordpress-6-7/
4+
// https://make.wordpress.org/core/2024/10/18/auto-sizes-for-lazy-loaded-images-in-wordpress-6-7/
55
add_filter('wp_img_tag_add_auto_sizes', '__return_false');
6+
7+
8+
// Remove the ACF translation instruction added in Polylang Pro 3.7 displaying Polylang language handling setting
9+
// Priority is set to 11 to run after Dispatcher::append_translation_instructions which uses default priority 10
10+
add_filter('acf/pre_render_fields', function ($fields) {
11+
// Remove the filter that was just added
12+
remove_filter('acf/prepare_field', array('WP_Syntex\Polylang_Pro\Integrations\ACF\Dispatcher', 'get_field_instructions'));
13+
14+
// Return the fields unchanged
15+
return $fields;
16+
}, 11);

mill3-wp-utils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: MILL3 WP Utils
44
* Plugin URI: https://github.com/Mill3/mill3-wp-utils-plugin
55
* Description: MILL3 WP Utils
6-
* Version: 0.1.3
6+
* Version: 0.1.4
77
* Author: MILL3 Studio
88
* Author URI: https://mill3.studio/
99
* Tested up to: 6.6.6
@@ -26,7 +26,7 @@
2626
* Start at version 0.0.1 and use SemVer - https://semver.org
2727
* Rename this for your plugin and update it as you release new versions.
2828
*/
29-
define( 'MILL3_WP_UTILS_VERSION', '0.1.3' );
29+
define( 'MILL3_WP_UTILS_VERSION', '0.1.4' );
3030

3131

3232
/**

0 commit comments

Comments
 (0)