Skip to content

Commit 401e97c

Browse files
committed
Update carpenter to support taxonomy DB changes in 4.4
1 parent 43bc3a5 commit 401e97c

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

carpenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Plugin Name: Carpenter
5-
* Version: 1.2.6
5+
* Version: 1.2.7
66
* Author: Apsis Labs
77
* Author URI: www.apsis.io
88
*/

core/taxonomy.cls.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ function __construct($name, $postType, $args = array()) {
3535
public function register() {
3636
if ( ! taxonomy_exists($this->slug) ) {
3737
register_taxonomy( $this->slug, $this->postType, $this->options );
38-
3938
if ( $this->defaults ) {
4039
$this->registerDefaults();
4140
}
@@ -101,12 +100,10 @@ public function defaultActionsRow($actions, $term) {
101100
protected function registerDefaults() {
102101
foreach ($this->defaults as $slug => $term) {
103102
if ( !get_term_by('slug', $slug, $this->slug) ) {
104-
105-
print_r($term);
106103
$options = isset($term['options']) ? $term['options'] : array();
107104

108105
$options = wp_parse_args($options, array(
109-
'description' => null,
106+
'description' => "",
110107
'slug' => $slug,
111108
'parent' => 0
112109
));
@@ -116,8 +113,6 @@ protected function registerDefaults() {
116113
$options['parent'] = $parent ? $parent->term_id : 0;
117114
}
118115

119-
echo $options['slug'];
120-
121116
// Format the Name
122117
$name = isset($term['name']) ? (string) $term['name'] : $this->createLabel($slug);
123118
wp_insert_term($name, $this->slug, $options);

0 commit comments

Comments
 (0)