Skip to content

Instantly share code, notes, and snippets.

@biuroreklama
Created February 6, 2018 13:08
Show Gist options
  • Select an option

  • Save biuroreklama/66dd968624e46c5cd7ee89f8b21e440f to your computer and use it in GitHub Desktop.

Select an option

Save biuroreklama/66dd968624e46c5cd7ee89f8b21e440f to your computer and use it in GitHub Desktop.
ACF and Orphans plugin
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