Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'wp_kses_allowed_html', 'esw_author_cap_filter',1,1 );
- function esw_author_cap_filter( $allowedposttags ) {
- //Here put your conditions, depending your context
- if ( !current_user_can( 'publish_posts' ) )
- return $allowedposttags;
- // Here add tags and attributes you want to allow
- $allowedposttags['iframe']=array(
- 'align' => true,
- 'width' => true,
- 'height' => true,
- 'frameborder' => true,
- 'name' => true,
- 'src' => true,
- 'id' => true,
- 'class' => true,
- 'style' => true,
- 'scrolling' => true,
- 'marginwidth' => true,
- 'marginheight' => true,
- );
- return $allowedposttags;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement