WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms + Custom Post Types
wp_set_post_terms without append parameter set. (1 post)

  1. timfield
    Member
    Posted 1 year ago #

    Hey would you guys be able to make the following change. The non append here is causing me to lose all taxonimes passed to wp_insert_post using the tax_input param.

    Index: gfcptaddonbase.php
    ===================================================================
    --- gfcptaddonbase.php	(revision 659110)
    +++ gfcptaddonbase.php	(working copy)
    @@ -412,7 +412,7 @@
                 } else if ( array_key_exists( 'type', $field ) && $field['type'] == 'text' ) {
                   $terms = $entry[$field['id']];
                   if ( !empty($terms) )
    -                wp_set_post_terms( $entry['post_id'], $terms, $taxonomy );
    +                wp_set_post_terms( $entry['post_id'], $terms, $taxonomy, true );
                 } else {
                     $term_id = (int) $entry[$field['id']];
                     if ( $term_id > 0 )
    @@ -422,4 +422,4 @@
         }
     }
    
    -?>
    \ No newline at end of file
    +?>

    http://wordpress.org/extend/plugins/gravity-forms-custom-post-types/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.