Astra_Ext_Nav_Menu_Markup::add_custom_fields( int $id, object $item, int $depth, array $args )

Add custom megamenu fields data to the menu.


Description


Parameters

$id

(int) (Required) menu item id.

$item

(object) (Required) A single menu item.

$depth

(int) (Required) menu item depth.

$args

(array) (Required) menu item arguments.


Return

(void.)


Source

File: addons/nav-menu/classes/class-astra-ext-nav-menu-markup.php

		public function add_custom_fields( $id, $item, $depth, $args ) {

			?>

			<input type="hidden" class="ast-nonce-field" value="<?php echo esc_attr( wp_create_nonce( 'ast-render-opts-' . $id ) ); ?>">

			<p class="description description-wide">
				<a class="button button-secondary button-large astra-megamenu-opts-btn" data-depth="<?php echo esc_attr( $depth ); ?>">
					<?php

						echo sprintf(
							/* translators: Astra Pro whitelabbeled string */
							esc_html__(
								'%1$s Menu Settings',
								'astra-addon'
							),
							esc_html( astra_get_theme_name() )
						);
					?>
				</a>
			</p>
			<?php
		}


User Contributed Notes

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