Make WP update terms count for all items #318
This commit is contained in:
parent
678f69f26a
commit
56b9e76aa1
|
@ -80,7 +80,8 @@ class Taxonomy extends Entity {
|
|||
'show_admin_column' => false,
|
||||
'rewrite' => [
|
||||
'slug' => $this->get_slug()
|
||||
],
|
||||
],
|
||||
'update_count_callback' => '_update_generic_term_count'
|
||||
);
|
||||
|
||||
if (taxonomy_exists($this->get_db_identifier())){
|
||||
|
|
|
@ -422,13 +422,13 @@ class Taxonomies extends TAINACAN_UnitTestCase {
|
|||
|
||||
$collection_1 = $this->tainacan_entity_factory->create_entity(
|
||||
'collection',
|
||||
array( 'name' => 'test-1' ),
|
||||
array( 'name' => 'test-1', 'status' => 'publish', ),
|
||||
true
|
||||
);
|
||||
|
||||
$collection_2 = $this->tainacan_entity_factory->create_entity(
|
||||
'collection',
|
||||
array( 'name' => 'test-2' ),
|
||||
array( 'name' => 'test-2', 'status' => 'publish', ),
|
||||
true
|
||||
);
|
||||
|
||||
|
@ -523,7 +523,8 @@ class Taxonomies extends TAINACAN_UnitTestCase {
|
|||
array(
|
||||
'title' => 'item teste',
|
||||
'description' => 'adasdasdsa',
|
||||
'collection' => $collection_1
|
||||
'collection' => $collection_1,
|
||||
'status' => 'publish'
|
||||
),
|
||||
true
|
||||
);
|
||||
|
@ -543,7 +544,8 @@ class Taxonomies extends TAINACAN_UnitTestCase {
|
|||
array(
|
||||
'title' => 'item teste',
|
||||
'description' => 'adasdasdsa',
|
||||
'collection' => $collection_2
|
||||
'collection' => $collection_2,
|
||||
'status' => 'private'
|
||||
),
|
||||
true
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue