From 401e97ce4c8539477e3d1b77b870400649f35fa4 Mon Sep 17 00:00:00 2001 From: Wyatt Kirby Date: Fri, 29 Apr 2016 11:23:42 -0700 Subject: [PATCH] Update carpenter to support taxonomy DB changes in 4.4 --- carpenter.php | 2 +- core/taxonomy.cls.php | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/carpenter.php b/carpenter.php index 09fd633..29cb1a7 100644 --- a/carpenter.php +++ b/carpenter.php @@ -2,7 +2,7 @@ /** * Plugin Name: Carpenter - * Version: 1.2.6 + * Version: 1.2.7 * Author: Apsis Labs * Author URI: www.apsis.io */ diff --git a/core/taxonomy.cls.php b/core/taxonomy.cls.php index 6734c16..ab1c837 100644 --- a/core/taxonomy.cls.php +++ b/core/taxonomy.cls.php @@ -35,7 +35,6 @@ function __construct($name, $postType, $args = array()) { public function register() { if ( ! taxonomy_exists($this->slug) ) { register_taxonomy( $this->slug, $this->postType, $this->options ); - if ( $this->defaults ) { $this->registerDefaults(); } @@ -101,12 +100,10 @@ public function defaultActionsRow($actions, $term) { protected function registerDefaults() { foreach ($this->defaults as $slug => $term) { if ( !get_term_by('slug', $slug, $this->slug) ) { - - print_r($term); $options = isset($term['options']) ? $term['options'] : array(); $options = wp_parse_args($options, array( - 'description' => null, + 'description' => "", 'slug' => $slug, 'parent' => 0 )); @@ -116,8 +113,6 @@ protected function registerDefaults() { $options['parent'] = $parent ? $parent->term_id : 0; } - echo $options['slug']; - // Format the Name $name = isset($term['name']) ? (string) $term['name'] : $this->createLabel($slug); wp_insert_term($name, $this->slug, $options);