最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

error Trying to get property of non-object and Cannot use object of type WP_Error as array in

programmeradmin1浏览0评论
    function im_check_term($name,$tax){  
    $term =  get_term_by("\x6e\x61\x6d\x65", $name,$tax);
    return !is_wp_error($term) ? $term->term_id : false;
    }
    function im_add_new_term($name,$tax){   
    if($tax == "\x67\x65\x6e\x72\x65"){      
    return wp_insert_term($name,$tax,array("\x73\x6c\x75\x67"=>array_search ($name, $genres)))["\x74\x65\x72\x6d\x5f\x69\x64"];  
    } else {
return wp_insert_term($name,$tax)["\x74\x65\x72\x6d\x5f\x69\x64"];  
  }
  }
发布评论

评论列表(0)

  1. 暂无评论