Astra_Ext_Advanced_Headers_Markup::add_options_markup( array $meta )

Sticky Header Meta Field markup


Description

Loads appropriate template file based on the style option selected in options panel.


Parameters

$meta

(array) (Required) Page Meta.


Source

File: addons/advanced-headers/classes/class-astra-ext-advanced-headers-markup.php

		public function add_options_markup( $meta ) {

			/**
			 * Get options
			 */
			$header_id = ( isset( $meta['adv-header-id-meta']['default'] ) ) ? $meta['adv-header-id-meta']['default'] : '';

			$header_options  = Astra_Target_Rules_Fields::get_post_selection( 'astra_adv_header' );
			$show_meta_field = ! astra_check_is_bb_themer_layout();
			if ( empty( $header_options ) ) {
				$header_options = array(
					'' => __( 'No Page Headers Found', 'astra-addon' ),
				);
			}

			?>

			<?php if ( $show_meta_field ) { ?>
				<div class="adv-header-wrapper">
					<p class="post-attributes-label-wrapper">
						<strong> <?php esc_html_e( 'Page Header', 'astra-addon' ); ?> </strong><br/>
					</p>
					<select name="adv-header-id-meta" id="adv-header-id-meta">
						<?php foreach ( $header_options as $key => $value ) { ?>
							<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $header_id, $key ); ?>> <?php echo esc_html( $value ); ?></option>
						<?php } ?>
					</select>
				</div>
				<?php
			}
		}

Changelog

Changelog
Version Description
1.0.0 Introduced.


User Contributed Notes

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