• I’ve fixed the bug where setting a post to be an even t causes it to remove categories alphabetically prior to “Events”.

    The problem was line 845, where array addition was used on two arrays that were both numerically indexed. Changing that to an array_merge instead preserves all members of the array.

    Old code:

    wp_set_post_categories( $postId, array( get_category( $category_id )->cat_ID ) + $cats );

    New code:

    wp_set_post_categories( $postId, array_merge(array( get_category( $category_id )->cat_ID ), $cats ));

    I hope this fix will make it into the next version of the plugin.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: The Events Calendar] Fix for category deselection bug’ is closed to new replies.