我正在尝试更新 elementor 数据中的 url。
$metacontent = get_post_meta($idforupdate, '_elementor_data',true);
$with_slash = stripslashes_deep($metacontent);
$with_slash = str_replace($value, $url_1, $with_slash);
$metacontent1 = str_replace("/", "\/", $with_slash);
update_post_meta( $idforupdate, '_elementor_data', $metacontent1 );
但....
我试图删除斜线并添加斜线。但是在保存后它用文本更改了所有内容并丢失了所有布局......
谢谢