function get_category()
 {
     $cats_ids = null;
     if (!($cats_ids = $this->get_options('categories'))) {
         $root_term_id = pinim_get_root_category_id();
         $cat_name = $this->get_datas('name');
         $board_term = pinim_get_term_id($cat_name, 'category', array('parent' => $root_term_id));
         if (is_wp_error($board_term)) {
             return $board_term;
         }
         $cats_ids = $board_term['term_id'];
     }
     return $cats_ids;
 }
function pinim_get_root_category_id()
{
    if (!($category_id = pinim()->get_options('category_root_id'))) {
        if ($root_term = pinim_get_term_id(pinim()->root_term_name, 'category')) {
            return $root_term['term_id'];
        }
    }
    return false;
}