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

admin2025-01-08  15

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

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736298990a5294.html

最新回复(0)