Skip to content

Commit

Permalink
fix (kses): only do this when the user can edit posts
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Sep 26, 2024
1 parent d2c090b commit a818959
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/kses.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
* @return array Modified HTML tags & attributes.
*/
function stackable_allow_wp_kses_allowed_html( $tags, $context ) {
// Only allow these tags if the user can edit posts.
if ( ! current_user_can( 'edit_posts' ) ) {
return $tags;
}

$tags['style'] = array(
'id' => true,
'class' => true,
Expand Down

0 comments on commit a818959

Please sign in to comment.