Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function acf_apply_content_filter_for_api($value, $post_id, $field){
- return str_replace( ']]>', ']]>', apply_filters( 'the_content', $value) );
- }
- function add_content_filter_ACF(){
- if(!is_admin()){
- remove_all_filters('acf/format_value/type=wysiwyg');
- add_filter('acf/format_value/type=wysiwyg', 'acf_apply_content_filter_for_api', 10, 3);
- }
- }
- add_action('init', 'add_content_filter_ACF');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement