dravpuso44681 2019-04-24 16:30
浏览 84

Wordpress Gootenberg编辑器钩子/过滤器来编辑嵌入数据

How to inject data that wordpress gets into embed from a server. E.g. Add my <div> to each embed data inside gutenberg editor. I did use embed_oembed_html but this one only imprints html when I render the page (preview). Visual block Editor (Gutenberg) somehow omitted. I'm wondering is this normal in general for this hook and is there may be some other hook to inject html into any iframe.

Just in case:

add_filter( 'embed_oembed_html', 'my_method', 99, 3 ); 
function my_method( $html, $url, $args ) {
    return $html.'<div>Some text!</div>';
};
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
    • ¥15 onvif+openssl,vs2022编译openssl64
    • ¥15 iOS 自定义输入法-第三方输入法
    • ¥15 很想要一个很好的答案或提示
    • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
    • ¥15 怀疑手机被监控,请问怎么解决和防止
    • ¥15 Qt下使用tcp获取数据的详细操作
    • ¥15 idea右下角设置编码是灰色的
    • ¥15 全志H618ROM新增分区
    • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示