Skip to:
Content

BuddyPress.org

Ticket #6936: fix_situation_description.patch

File fix_situation_description.patch, 1.0 KB (added by chherbst, 8 years ago)
  • bp-core/admin/bp-core-admin-schema.php

    diff --git a/bp-core/admin/bp-core-admin-schema.php b/bp-core/admin/bp-core-admin-schema.php
    index 523a4db..2c1089a 100644
    a b function bp_core_install_emails() { 
    695695                       continue;
    696696               }
    697697
    698                $term_ids = wp_set_post_terms( $post_id, $id, bp_get_email_tax_type() );
    699                foreach ( $term_ids as $term_id ) {
    700                        wp_update_term( (int) $term_id, bp_get_email_tax_type(), array(
     698               $term_ids = wp_set_object_terms( $post_id, $id, bp_get_email_tax_type() );
     699
     700               foreach ( $term_ids as $term_taxonomy_id ) {
     701                       $term = get_term_by( 'term_taxonomy_id', (int) $term_taxonomy_id, bp_get_email_tax_type());
     702                       wp_update_term( (int) $term->term_id, bp_get_email_tax_type(), array(
    701703                               'description' => $descriptions[ $id ],
    702704                       ) );
    703705               }