public static function getTermIdbyName($name, $type = self::TYPE_TAG)
    {
        $tag = get_term_by('name', $name, $type);
        return ($tag) ? $tag->term_id : 0;
    }
public static function getTermIdbyName($name, $type = self::TYPE_TAG)
    {
        $tag = get_term_by('name', $name, $type);
        return ($tag) ? $tag->term_id : 0;
    }
public static function getTermIdbyName ( $ name , $ type = self :: TYPE_TAG ) { $ tag = get_term_by ( 'name' , $ name , $ type ) ; return ( $ tag ) ? $ tag -> term_id : 0 ; }
Return the ID from the tag name

@param string $name
Term name
@param string $type
Term type

@return int ID from the term name
Return the ID from the tag name