Created
February 6, 2018 13:08
-
-
Save biuroreklama/66dd968624e46c5cd7ee89f8b21e440f to your computer and use it in GitHub Desktop.
ACF and Orphans plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function acf_orphans($value, $post_id, $field) { | |
| if ( class_exists( 'iworks_orphan' ) ) { | |
| $orphan = new \iworks_orphan(); | |
| $value = $orphan->replace( $value ); | |
| } | |
| return $value; | |
| } | |
| add_filter('acf/format_value/type=textarea', 'acf_orphans', 10, 3); | |
| add_filter('acf/format_value/type=wysiwyg', 'acf_orphans', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment