Astra_Builder_UI_Controller::render_html_markup( string $index = 'header-html-1' )

Prepare HTML Markup.


Description


Parameters

$index

(string) (Optional) Key of the HTML Control.

Default value: 'header-html-1'


Source

File: inc/builder/controllers/class-astra-builder-ui-controller.php

		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 '<div class="ast-header-html inner-link-style-' . esc_attr( $link_style ) . '">';
				if ( is_customize_preview() ) {
					self::render_customizer_edit_button();
				}
				echo '<div class="ast-builder-html-element">';
				$content = str_replace( '[copyright]', '&copy;', $content );
				$content = str_replace( '[current_year]', gmdate( 'Y' ), $content );
				$content = str_replace( '[site_title]', get_bloginfo( 'name' ), $content );
				$content = str_replace( '[theme_author]', '<a href=" ' . esc_url( $theme_author['theme_author_url'] ) . '" rel="nofollow noopener" target="_blank">' . $theme_author['theme_name'] . '</a>', $content );
				echo do_shortcode( wpautop( $content ) );
				echo '</div>';
				echo '</div>';
			}
		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.