| 1 |
<?php |
| 2 |
namespace FakerPress\Module; |
| 3 |
|
| 4 |
class Term extends Base { |
| 5 |
|
| 6 |
public $dependencies = array( |
| 7 |
'\Faker\Provider\Lorem', |
| 8 |
); |
| 9 |
|
| 10 |
public $provider = '\Faker\Provider\WP_Term'; |
| 11 |
|
| 12 |
public function save() { |
| 13 |
$args = array( |
| 14 |
'description' => $this->params['description'], |
| 15 |
'parent' => $this->params['parent_term'], |
| 16 |
); |
| 17 |
return wp_insert_term( $this->params['name'], $this->params['taxonomy'], $args ); |
| 18 |
} |
| 19 |
} |
| 20 |
|