@@ -549,56 +549,4 @@ function osi_handle_supporter_form_flamingo_spam_status_change( string $new_stat
549549 }
550550 }
551551}
552- add_action ( 'transition_post_status ' , 'osi_handle_supporter_form_flamingo_spam_status_change ' , 10 , 3 );
553-
554- /**
555- * Allow Font Awesome icons in Gutenberg blocks
556- */
557- function allow_font_awesome_icons ($ allowed_html ) {
558- // If the allowed_html array doesn't exist, create it
559- if (!is_array ($ allowed_html )) {
560- $ allowed_html = array ();
561- }
562-
563- // Add specific Font Awesome support
564- $ allowed_html ['i ' ] = array (
565- 'class ' => true ,
566- 'style ' => true ,
567- 'aria-hidden ' => true ,
568- );
569-
570- // Add support for div containers
571- $ allowed_html ['div ' ] = array (
572- 'class ' => true ,
573- 'style ' => true ,
574- );
575-
576- return $ allowed_html ;
577- }
578- add_filter ('wp_kses_allowed_html ' , 'allow_font_awesome_icons ' , 99 , 1 );
579-
580- /**
581- * Allow Font Awesome classes in Gutenberg blocks
582- */
583- function allow_fa_classes_in_blocks ($ block_content , $ block ) {
584- // Remove wp_kses filtering for blocks that might contain Font Awesome icons
585- if (isset ($ block ['blockName ' ]) && (
586- strpos ($ block ['blockName ' ], 'core/html ' ) !== false ||
587- strpos ($ block ['blockName ' ], 'core/paragraph ' ) !== false ||
588- strpos ($ block ['blockName ' ], 'core/group ' ) !== false
589- )) {
590- remove_filter ('the_content ' , 'wp_kses_post ' );
591- }
592-
593- return $ block_content ;
594- }
595- add_filter ('render_block ' , 'allow_fa_classes_in_blocks ' , 10 , 2 );
596-
597- /**
598- * Add Font Awesome to allowed protocols
599- */
600- function add_fa_to_allowed_protocols ($ protocols ) {
601- $ protocols [] = 'data-fa ' ;
602- return $ protocols ;
603- }
604- add_filter ('kses_allowed_protocols ' , 'add_fa_to_allowed_protocols ' );
552+ add_action ( 'transition_post_status ' , 'osi_handle_supporter_form_flamingo_spam_status_change ' , 10 , 3 );
0 commit comments