'; /** @psalm-suppress DocblockTypeContradiction */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort if ( ! self::$ast_svgs ) { ob_start(); include_once ASTRA_THEME_DIR . 'assets/svg/svgs.json'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound self::$ast_svgs = json_decode( ob_get_clean(), true ); self::$ast_svgs = apply_filters( 'astra_svg_icons', self::$ast_svgs ); } $output .= isset( self::$ast_svgs[ $icon ] ) ? self::$ast_svgs[ $icon ] : ''; $output .= ''; return $output; } /** * Prepare Social Icon HTML. * * @param string $index The Index of the social icon. * @param string $builder_type the type of the builder. */ public static function render_social_icon( $index, $builder_type = 'header' ) { $items = astra_get_option( $builder_type . '-social-icons-' . $index ); $items = isset( $items['items'] ) ? $items['items'] : array(); $show_label = astra_get_option( $builder_type . '-social-' . $index . '-label-toggle' ); $color_type = astra_get_option( $builder_type . '-social-' . $index . '-color-type' ); $social_stack = astra_get_option( $builder_type . '-social-' . $index . '-stack', 'none' ); echo '
'; } /** * Prepare HTML Markup. * * @param string $index Key of the HTML Control. */ public static function render_html_markup( $index = 'header-html-1' ) { $theme_author = astra_get_theme_author_details(); $content = astra_get_i18n_option( $index, Astra_Builder_Helper::get_translatable_string( $index ) ); if ( $content || is_customize_preview() ) { $link_style = ''; echo 'around shortcodes. $content = shortcode_unautop( wpautop( $content ) ); $allowed_html = wp_kses_allowed_html( 'post' ); // Add here additional tags that weren't working if you got something. $additional_tags = array( 'select' => array( 'name' => true, 'id' => true, 'class' => true, 'multiple' => true, 'size' => true, 'required' => true, 'disabled' => true, 'style' => true, ), 'option' => array( 'value' => true, 'selected' => true, 'disabled' => true, 'class' => true, 'id' => true, ), 'optgroup' => array( 'label' => true, 'disabled' => true, 'class' => true, ), 'iframe' => array( 'src' => true, 'width' => true, 'height' => true, 'frameborder' => true, 'allowfullscreen' => true, 'style' => true, 'title' => true, 'loading' => true, 'referrerpolicy' => true, 'sandbox' => true, 'class' => true, 'id' => true, ), ); $allowed_html = array_merge( $allowed_html, $additional_tags ); /** * Filter allowed HTML tags for HTML widget content. * * @param array $allowed_html Array of allowed HTML tags and attributes. * @param string $content The HTML content being filtered. * @since 4.11.11 * * @psalm-suppress TooManyArguments */ $allowed_html = apply_filters( 'astra_html_widget_allowed_html', $allowed_html, $content ); echo do_shortcode( wp_kses( $content, $allowed_html ) ); echo '