Astra_Builder_UI_Controller::render_button( string $index, string $builder_type = 'header' )

Prepare Button HTML.


Description


Parameters

$index

(string) (Required) The Index of the button.

$builder_type

(string) (Optional) the type of the builder.

Default value: 'header'


Source

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

		public static function render_button( $index, $builder_type = 'header' ) {
			if ( is_customize_preview() ) {
				self::render_customizer_edit_button();
			}

			$button_size = astra_get_option( $builder_type . '-button' . $index . '-size' );

			echo '<div class="ast-builder-button-wrap ast-builder-button-size-' . $button_size . '">'; // 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 '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		}


User Contributed Notes

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