src/WordpressClient.php
function newTerm($name, $taxomony, $slug = null, $description = null, $parentId = null)
    {
        $content = array(
            'name'     => $name,
            'taxonomy' => $taxomony,
        );
        if ($slug) {
            $content['slug'] = $slug;
        }
        if ($description) {
            $content['description'] = $description;
        }
        if ($parentId) {
            $content['parent'] = $parentId;
        }
        $params = array(1, $this->username, $this->password, $content);

        return $this->sendRequest('wp.newTerm', $params);
    }
function newTerm($name, $taxomony, $slug = null, $description = null, $parentId = null)
    {
        $content = array(
            'name'     => $name,
            'taxonomy' => $taxomony,
        );
        if ($slug) {
            $content['slug'] = $slug;
        }
        if ($description) {
            $content['description'] = $description;
        }
        if ($parentId) {
            $content['parent'] = $parentId;
        }
        $params = array(1, $this->username, $this->password, $content);

        return $this->sendRequest('wp.newTerm', $params);
    }
function newTerm ( $ name , $ taxomony , $ slug = null , $ description = null , $ parentId = null ) { $ content = array ( 'name' => $ name , 'taxonomy' => $ taxomony , ) ; if ( $ slug ) { $ content [ 'slug' ] = $ slug ; } if ( $ description ) { $ content [ 'description' ] = $ description ; } if ( $ parentId ) { $ content [ 'parent' ] = $ parentId ; } $ params = array ( 1 , $ this -> username , $ this -> password , $ content ) ; return $ this -> sendRequest ( 'wp.newTerm' , $ params ) ; }
Create a new taxonomy term.

@param string  $name
@param string  $taxomony
@param string  $slug
@param string  $description
@param integer $parentId

@return integer new term id

@link http://codex.wordpress.org/XML-RPC_WordPress_API/Taxonomies#wp.newTerm
Create a new taxonomy term .