在Wordpress中创建标记后获取标记名称和标记slug

时间:2017-02-20 16:43:17

标签: php wordpress

我希望在Wordpress中创建标记后获得标记名称标记slug

我已经在"post_tag"中完成了这项工作,但它只是在$tags中返回function update_tags($tags) { $data = array("name" => $tags->name,"slug" => $tags->slug,); $data_string = json_encode($data); $ch = curl_init('APIURL'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); } add_action( 'post_tag_add_form', 'update_tags',10 ,1 ); ,我需要创建标记名称和slug作为回报或通过任何其他方法。< / p>

感谢任何形式的帮助。

ValueError: Cannot feed value of shape (40, 24, 24, 4) for Tensor u'real_images:0', which has shape '(40, 24, 24, 3)'

0 个答案:

没有答案