'; 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 '
'; if ( is_customize_preview() ) { self::render_customizer_edit_button(); } echo '
'; if ( is_array( $items ) && ! empty( $items ) ) { foreach ( $items as $item ) { if ( $item['enabled'] ) { $link = $item['url']; switch ( $item['id'] ) { case 'phone': $link = 'tel:' . $item['url']; break; case 'email': $link = 'mailto:' . $item['url']; break; case 'whatsapp': $link = 'https://api.whatsapp.com/send?phone=' . $item['url']; break; } echo ''; echo self::fetch_svg_icon( $item['icon'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ( $show_label ) { echo ''; } echo ''; } } } echo apply_filters( 'astra_social_icons_after', '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '
'; 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_option( $index ); if ( $content || is_customize_preview() ) { $link_style = ''; echo ''; } } /** * Prepare Edit icon inside customizer. */ public static function render_customizer_edit_button() { ?>
'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo astra_get_custom_button( $builder_type . '-button' . $index . '-text', $builder_type . '-button' . $index . '-link-option', 'header-button' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** * Site Identity. */ public static function render_site_identity() { ?>
'site-branding ast-site-identity', ) ); ?> >
>
request ) ); $default_login = wp_login_url(); if ( $default_login === $login_link['url'] ) { $login_link['url'] = wp_login_url( $current_url ); } $link_url = $login_link['url']; $new_tab = ( $login_link['new_tab'] ? 'target=_blank' : 'target=_self' ); $link_rel = ( ! empty( $login_link['link_rel'] ) ? 'rel=' . esc_attr( $login_link['link_rel'] ) : '' ); } $link_href = 'href=' . esc_url( $link_url ) . ''; ?> >