admin管理员组

文章数量:1122832

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"?

本文标签: functionsWould it be possible to disable embeds for specific user roles If sohow