PluginProbe
FakerPress / 0.1.1
FakerPress v0.1.1
0.9.2 trunk 0.1.0 0.1.1 0.1.2 0.1.3 0.5.2 0.5.3 0.6.1 0.6.2 0.6.3 0.6.4 0.6.5 0.6.6 0.7.0 0.7.1 0.7.2 0.8.0 0.9.0 0.9.1
fakerpress / modules / term.php

term.php in FakerPress 0.1.1, at modules/term.php

20 lines 406 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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