Support

Account

Forum Replies Created

  • That is interesting. I must be experiencing some other plugin conflict then. Like mentioned, allowing svg tags works just as expected.

  • It’s preserving ID tags as well for you? Priority didn’t seem to have any effect, tried as high as 99 as well.

    I am however still running version 6.2.4, but I assume it should be working on that version as well. I will be updating and trying again soon.

    acf/render_field works well enough as a workaround for now though.

  • Apologies, that was silly of me. Using acf/prepare_field is actually what I’m doing, but the id and class attributes of input tag are being stripped out when the message field is rendered.

    I did get around this issue by using acf/render_field and echo the output I need instead. This seems to honor the allowed tags set by the wp_kses_allowed_html filter

  • Thank you for that. Kind of figured that is the case and ACF uses update_option() in the background.

  • Thank you for the tips. I’ll try and get this figured out!

  • Anyone have any ideas where to go about this?

    I have some kind of idea how to use wp_set_object_terms() to set the terms, but having trouble gathering all posts in the Post Object field and then adding the term into them. And don’t really have any idea how to make the dynamic aspect of removing the term if posts gets removed from the Post Object field.

    Thanks

  • @hatsumatsu ‘s solution works great, except I can’t seem to be able to make it work with a date field assigned to a custom taxonomy. I’m using it for a date picker like this:

    /**
     * Convert values of ACF core date pickers from Ymd to timestamp
     * @param  string $value   unmodified value
     * @param  int    $post_id post ID
     * @param  object $field   field object
     * @return string          modified value
     */
    function acf_save_as_wp_date( $value, $post_id, $field  ) {
        if( $value ) {
            $value = strtotime( $value );
        }
    
        return $value;    
    }
    
    add_filter( 'acf/update_value/type=date_picker', 'acf_save_as_wp_date', 10, 3 );
    
    /**
     * Convert values of ACF core date pickers from timestamp to Ymd
     * @param  string $value   unmodified value
     * @param  int    $post_id post ID
     * @param  object $field   field object
     * @return string          modified value
     */
    function acf_load_as_acf_date( $value, $post_id, $field  ) {
        if( $value ) {
            $value = date( 'Ymd', $value );
        }
    
        return $value;    
    }
    
    add_filter( 'acf/load_value/type=date_picker', 'acf_load_as_acf_date', 10, 3 );

    Tried adding the name of taxonomy, like $value = strtotime( $value, 'event_dates' ); and $value = date( 'Ymd', $value, 'event_dates' ); as well, but I don’t know if that’s at all correct way of doing it.

  • Figured it out, was running into PHP max input variables limit. Increased it to 3000 and everything is fine.

  • Figured it out, was running into PHP max input variables limit. Increased it to 3000 and everything is fine.

  • I’m experiencing this as well. Location sometimes resets to ‘Post’ and at the same time other field group settings reset as well, like Style and Label Placement. Happens with my field group that is assigned to appear in an options page. Field group itself is quite large. Well over 200 fields counting accordion fields etc, could that be the cause?

Viewing 10 posts - 1 through 10 (of 10 total)