From 58d7d9b792541650433a209b1742437ba8ac3d75 Mon Sep 17 00:00:00 2001 From: Kiran Nasim Date: Fri, 4 Mar 2022 05:37:15 -0800 Subject: [PATCH] Fixed that flags do not show with WPML plugin --- inc/extras.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/inc/extras.php b/inc/extras.php index b34cfe5b..7f10e145 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -235,6 +235,23 @@ if ( ! function_exists( 'understrap_kses_title' ) ) { } } // End of if function_exists( 'understrap_kses_title' ). +// Add the 'data' protocol to the array of allowed protocols +add_filter( 'kses_allowed_protocols' , 'upderstrap_allow_data_protocol' ); + +if ( ! function_exists( 'upderstrap_allow_data_protocol' ) ) { + /** + * Add 'data' protocol to the array of allowed protocols + * + * @param string[] Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more. + * @return Filters the list of protocols allowed in HTML attributes. + */ + function upderstrap_allow_data_protocol( $protocols ) { + array_push( $protocols, 'data' ); + + return $protocols; + } +} // End of if function_exists( 'upderstrap_allow_data_protocol' ). + if ( ! function_exists( 'understrap_hide_posted_by' ) ) { /** * Hides the posted by markup in `understrap_posted_on()`.