我正在尝试使用以下代码创建 pod 关系:
$data = array(
"pod_id" => esc_attr(strip_tags($_POST['customMetaAutorID'])),
"field_id" => 1073,
"item_id" => $post_id,
"related_item_id" => $_POST["customMetaAutorID"],
"related_pod_id" => 0,
"related_field_id" => 0,
"weight" => 0
);
$wpdb->insert("wp_podsrel", $data);
该行被添加到表中,但是,在刷新几页后,我开始收到错误:
Strict Standards: Declaration of acf_taxonomy_field_walker::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0)
这意味着我只有白屏死机,我唯一能做的就是恢复数据库。
添加 pod 关系字段值而不破坏其他所有内容的方法是什么?