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

functions - Would it be possible to disable embeds for specific user roles? If so, how?

programmeradmin17浏览0评论

I would like to disable embeds for specific custom user roles. I found this solution to disable embeds from WPPagebuilders:

function my_deregister_scripts(){
 wp_dequeue_script( 'wp-embed' );
}
add_action( 'wp_footer', 'my_deregister_scripts' );

How might I add something like, "if user role is X or Y, use this function"?

发布评论

评论列表(0)

  1. 暂无评论