Astra_Ext_Nav_Menu_Markup::render_mm_popup_html()
Render HTML for nav menu settings popup.
Description
Return
(void)
Source
File: addons/nav-menu/classes/class-astra-ext-nav-menu-markup.php
public function render_mm_popup_html() { if ( ! current_user_can( 'edit_theme_options' ) ) { wp_die(); } $menu_item_id = sanitize_text_field( $_POST['menu_item_id'] ); $menu_parent_id = sanitize_text_field( $_POST['parent_id'] ); check_ajax_referer( 'ast-render-opts-' . $menu_item_id, 'security_nonce' ); if ( ! current_user_can( 'edit_theme_options' ) ) { wp_die(); } ob_start(); $megamenu = get_post_meta( $menu_item_id, '_menu_item_megamenu', true ); $megamenu_width = get_post_meta( $menu_item_id, '_menu_item_megamenu_width', true ); $megamenu_col = get_post_meta( $menu_item_id, '_menu_item_megamenu_col', true ); $megamenu_text_color = get_post_meta( $menu_item_id, '_menu_item_megamenu_text_color', true ); $megamenu_text_h_color = get_post_meta( $menu_item_id, '_menu_item_megamenu_text_h_color', true ); $megamenu_background_image = get_post_meta( $menu_item_id, '_menu_item_megamenu_background_image', true ); $megamenu_bg_size = get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_size', true ); $megamenu_bg_repeat = get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_repeat', true ); $megamenu_bg_position = get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_position', true ); $megamenu_bg_color = get_post_meta( $menu_item_id, '_menu_item_megamenu_bg_color', true ); $megamenu_highlight_label = get_post_meta( $menu_item_id, '_menu_item_megamenu_highlight_label', true ); $megamenu_label_color = get_post_meta( $menu_item_id, '_menu_item_megamenu_label_color', true ); $megamenu_label_bg_color = get_post_meta( $menu_item_id, '_menu_item_megamenu_label_bg_color', true ); $megamenu_column_divider_color = get_post_meta( $menu_item_id, '_menu_item_megamenu_column_divider_color', true ); $megamenu_heading_separator_color = get_post_meta( $menu_item_id, '_menu_item_megamenu_heading_separator_color', true ); $megamenu_content_src = get_post_meta( $menu_item_id, '_menu_item_megamenu_content_src', true ); $megamenu_custom_text = get_post_meta( $menu_item_id, '_menu_item_megamenu_custom_text', true ); $megamenu_disable_title = get_post_meta( $menu_item_id, '_menu_item_megamenu_disable_title', true ); $megamenu_enable_heading = get_post_meta( $menu_item_id, '_menu_item_megamenu_enable_heading', true ); $megamenu_disable_link = get_post_meta( $menu_item_id, '_menu_item_megamenu_disable_link', true ); $custom_width = get_post_meta( $menu_item_id, '_menu_item_megamenu_custom_width', true ); $megamenu_margin_top = get_post_meta( $menu_item_id, '_menu_item_megamenu_margin_top', true ); $megamenu_margin_right = get_post_meta( $menu_item_id, '_menu_item_megamenu_margin_right', true ); $megamenu_margin_bottom = get_post_meta( $menu_item_id, '_menu_item_megamenu_margin_bottom', true ); $megamenu_margin_left = get_post_meta( $menu_item_id, '_menu_item_megamenu_margin_left', true ); $megamenu_padding_top = get_post_meta( $menu_item_id, '_menu_item_megamenu_padding_top', true ); $megamenu_padding_right = get_post_meta( $menu_item_id, '_menu_item_megamenu_padding_right', true ); $megamenu_padding_bottom = get_post_meta( $menu_item_id, '_menu_item_megamenu_padding_bottom', true ); $megamenu_padding_left = get_post_meta( $menu_item_id, '_menu_item_megamenu_padding_left', true ); $parent_megamenu = get_post_meta( $menu_parent_id, '_menu_item_megamenu', true ); $megamenu_template = get_post_meta( $menu_item_id, '_menu_item_megamenu_template', true ); $menulabel_style = ''; if ( 'disable-title' == $megamenu_disable_title ) { $menulabel_style = "style='display:none;'"; } $mm_container_style = ''; if ( 'megamenu' != $megamenu ) { $mm_container_style = "style='display:none;'"; } if ( 'megamenu' == $parent_megamenu || '' == $menu_parent_id ) { $parent_container_class = 'ast-show'; } else { $parent_container_class = 'ast-hide'; } if ( 'enable-heading' === $megamenu_enable_heading ) { $color_class = 'ast-show'; } else { $color_class = 'ast-hide'; } ?> <div class="astra-mm-title-wrap"> <h2> <?php echo sprintf( /* translators: Astra Pro whitelabbeled string */ esc_html__( '%1$s Menu Options', 'astra-addon' ), esc_html( astra_get_theme_name() ) ); ?> </h2> <span class="ast-editing-label" data-label="<?php esc_attr_e( 'Editing', 'astra-addon' ); ?>"></span> <div class="astra-mm-close dashicons dashicons-no-alt"></div> </div> <div class="ast-mm-settings"> <div class="astra-mm-option-container field-mm-megamenu-opts <?php echo esc_attr( $parent_container_class ); ?> " > <h2 class="astra-mm-option-heading"><?php esc_html_e( 'Mega Menu', 'astra-addon' ); ?></h2> <input type="hidden" class="ast-nonce-field" name="ast-mm-opts-nonce-<?php echo esc_attr( $menu_item_id ); ?>" value="<?php echo esc_attr( wp_create_nonce( 'ast-save-opts-' . $menu_item_id ) ); ?>"> <input type="hidden" class="ast-nonce-field ast-drop-widget-nonce" name="ast-drop-widget-nonce-<?php echo esc_attr( $menu_item_id ); ?>" value="<?php echo esc_attr( wp_create_nonce( 'ast-drop-widget-' . $menu_item_id ) ); ?>"> <input type="hidden" class="ast-nonce-field ast-render-widgets-nonce" name="ast-render-widgets-nonce-<?php echo esc_attr( $menu_item_id ); ?>" value="<?php echo esc_attr( wp_create_nonce( 'ast-render-widgets-' . $menu_item_id ) ); ?>"> <div class="astra-mm-settings-wrap field-mm-enabled"> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu-<?php echo esc_attr( $menu_item_id ); ?>"><?php esc_html_e( 'Enable Mega Menu', 'astra-addon' ); ?></label> </div> <div class="astra-option-input-container"> <input type="checkbox" id="edit-menu-item-megamenu-<?php echo esc_attr( $menu_item_id ); ?>" class="code edit-menu-item-megamenu" value="megamenu" name="megamenu" <?php checked( $megamenu, 'megamenu' ); ?> /> </div> </div> <div class="astra-mm-settings-wrap field-mm-width" <?php echo $mm_container_style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> > <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_width-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Mega Menu Width', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <select id="edit-menu-item-megamenu_width-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_width"> <option value="content" <?php selected( $megamenu_width, 'content' ); ?> > <?php esc_attr_e( 'Content', 'astra-addon' ); ?> </option> <option value="menu-container" <?php selected( $megamenu_width, 'menu-container' ); ?> > <?php esc_attr_e( 'Menu Container Width', 'astra-addon' ); ?> </option> <option value="full" <?php selected( $megamenu_width, 'full' ); ?> > <?php esc_attr_e( 'Full Width', 'astra-addon' ); ?> </option> <option value="full-stretched" <?php selected( $megamenu_width, 'full-stretched' ); ?> > <?php esc_attr_e( 'Full Width Stretched', 'astra-addon' ); ?> </option> <option value="custom" <?php selected( $megamenu_width, 'custom' ); ?> > <?php esc_attr_e( 'Custom Width', 'astra-addon' ); ?> </option> </select> </div> </div> <div class="astra-mm-settings-wrap mm-custom-width-wrap"> <div class="ast-mm-label-container"> <label for="mega-menu-item-megamenu_custom_width-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Custom Width (in px)', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="number" class="ast-mm-input" id="mega-menu-item-megamenu_custom_width-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_custom_width" / value="<?php echo esc_attr( $custom_width ); ?>" > </div> </div> <div class="astra-mm-settings-wrap field-mm-width" <?php echo $mm_container_style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> > <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_heading_color"> <?php esc_html_e( 'Change Heading Color', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <?php $url = admin_url( 'customize.php?autofocus[control]=' . ASTRA_THEME_SETTINGS . '[primary-header-megamenu-heading-color]' ); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { $url = admin_url( 'customize.php?autofocus[control]=' . ASTRA_THEME_SETTINGS . '[header-menu1-mega-menu-col-color-group]&context=design' ); } ?> <a href="<?php echo esc_url( $url ); ?>" for="edit-menu-item-megamenu_heading_color_link"> <?php esc_html_e( 'Click Here!', 'astra-addon' ); ?> </a> </div> </div> <!-- Column Heading field--> <div class="astra-mm-settings-wrap field-mm-enabled-heading <?php echo esc_attr( $parent_container_class ); ?> " > <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_enable_heading-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Make this menu as column heading?', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="checkbox" id="edit-menu-item-megamenu_enable_heading-<?php echo esc_attr( $menu_item_id ); ?>" class="code edit-menu-item-megamenu_enable_heading" value="enable-heading" name="megamenu_enable_heading"<?php checked( $megamenu_enable_heading, 'enable-heading' ); ?> /> </div> </div> <div class="astra-mm-settings-wrap field-mm-header-sep-color <?php echo esc_attr( $color_class ); ?>"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Column Heading Separator Color', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="text" data-alpha="true" class="astra-wp-color-input" id="edit-menu-item-megamenu_heading_separator_color-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_heading_separator_color" value="<?php echo esc_attr( $megamenu_heading_separator_color ); ?>"/> </div> </div> </div> <div class="astra-mm-option-container field-mm-megamenu-label" > <h2 class="astra-mm-option-heading"><?php esc_html_e( 'Menu Label', 'astra-addon' ); ?></h2> <!-- Submenu Disable Label/Description field--> <div class="astra-mm-settings-wrap field-mm-disable-label"> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_disable_title-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Hide Menu Label/Description?', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="checkbox" id="edit-menu-item-megamenu_disable_title-<?php echo esc_attr( $menu_item_id ); ?>" class="code edit-menu-item-megamenu_disable_title" value="disable-title" name="megamenu_disable_title" <?php checked( $megamenu_disable_title, 'disable-title' ); ?> /> </div> </div> <!-- Submenu Disable link field--> <div class="astra-mm-settings-wrap field-mm-disable-link" <?php echo esc_attr( $menulabel_style ); ?>> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_disable_link-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Disable Link', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="checkbox" id="edit-menu-item-megamenu_disable_link-<?php echo esc_attr( $menu_item_id ); ?>" class="code edit-menu-item-megamenu_disable_link" value="disable-link" name="megamenu_disable_link" <?php checked( $megamenu_disable_link, 'disable-link' ); ?> /> </div> </div> </div> <div class="astra-mm-option-container field-mm-bg-img bg-image-container" <?php echo $mm_container_style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> > <h2 class="astra-mm-option-heading"><?php esc_html_e( 'Background Color / Image', 'astra-addon' ); ?></h2> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Background Color', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="text" data-alpha="true" class="astra-wp-color-input" id="edit-menu-item-megamenu_bg_color-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_bg_color" value="<?php echo esc_attr( $megamenu_bg_color ); ?>"/> </div> </div> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Background Image', 'astra-addon' ); ?> </label> </div> <?php $image_set_cls = ''; if ( '' != $megamenu_background_image ) { $image_set_cls = 'ast-image-set'; } ?> <div class="astra-option-input-container ast-media-img-container <?php echo esc_attr( $image_set_cls ); ?>"> <input type="hidden" id="edit-menu-item-megamenu-background-image-<?php echo esc_attr( $menu_item_id ); ?>" class="regular-text astra-builder-upload-field" name="menu-item-megamenu_background_image" value="<?php echo esc_attr( $megamenu_background_image ); ?>" /> <div class="astra-builder-upload-preview"> <img src="<?php echo esc_attr( $megamenu_background_image ); ?>" id="astra-media-img-background-image-<?php echo esc_attr( $menu_item_id ); ?>" class="astra-megamenu-background-image" style="<?php echo ( trim( $megamenu_background_image ) ) ? 'display:inline;' : ''; ?>" /> </div> <input type='button' data-id="background-image-<?php echo esc_attr( $menu_item_id ); ?>" class='button-upload astra-builder-upload-button astra-edit-button button button-secondary' data-type="image" value="<?php esc_attr_e( 'Edit', 'astra-addon' ); ?>" /> <input type="button" data-id="background-image-<?php echo esc_attr( $menu_item_id ); ?>" class="button button-secondary upload-image-remove ast-remove-button" value="<?php esc_attr_e( 'Remove', 'astra-addon' ); ?>" /> <input type='button' data-id="background-image-<?php echo esc_attr( $menu_item_id ); ?>" class='button-upload astra-builder-upload-button ast-upload-button button-secondary' data-type="image" value="<?php esc_attr_e( 'Upload Image', 'astra-addon' ); ?>" /> </div> </div> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Background Repeat', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <?php $bg_sizes = array( 'no-repeat' => __( 'No Repeat', 'astra-addon' ), 'repeat' => __( 'Repeat All', 'astra-addon' ), 'repeat-x' => __( 'Repeat Horizontally', 'astra-addon' ), 'repeat-y' => __( 'Repeat Vertically', 'astra-addon' ), ); ?> <select id="edit-menu-item-megamenu_bg_repeat-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_bg_repeat"> <?php foreach ( $bg_sizes as $key => $value ) { ?> <option <?php selected( $megamenu_bg_repeat, $key ); ?> value="<?php echo esc_attr( $key ); ?>"> <?php echo esc_html( $value ); ?> </option> <?php } ?> </select> </div> </div> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Background Size', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <?php $bg_sizes = array( 'auto' => __( 'Auto', 'astra-addon' ), 'cover' => __( 'Cover', 'astra-addon' ), 'contain' => __( 'Contain', 'astra-addon' ), ); $megamenu_bg_size = ! $megamenu_bg_size ? 'cover' : $megamenu_bg_size; ?> <select id="edit-menu-item-megamenu_bg_size-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_bg_size"> <?php foreach ( $bg_sizes as $key => $value ) { ?> <option <?php selected( $megamenu_bg_size, $key ); ?> value="<?php echo esc_attr( $key ); ?>"> <?php echo esc_html( $value ); ?> </option> <?php } ?> </select> </div> </div> <div class="astra-mm-settings-wrap field-mm-bg-position"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Background Position', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <?php $bg_positions = array( 'left top' => __( 'Left Top', 'astra-addon' ), 'left center' => __( 'Left Center', 'astra-addon' ), 'left bottom' => __( 'Left Bottom', 'astra-addon' ), 'right top' => __( 'Right Top', 'astra-addon' ), 'right center' => __( 'Right Center', 'astra-addon' ), 'right bottom' => __( 'Right Bottom', 'astra-addon' ), 'center top' => __( 'Center Top', 'astra-addon' ), 'center center' => __( 'Center Center', 'astra-addon' ), 'center bottom' => __( 'Center Bottom', 'astra-addon' ), ); ?> <select id="edit-menu-item-megamenu_bg_position-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_bg_position"> <?php foreach ( $bg_positions as $key => $value ) { ?> <option <?php selected( $megamenu_bg_position, $key ); ?> value="<?php echo esc_attr( $key ); ?>"> <?php echo esc_attr( $value ); ?> </option> <?php } ?> </select> </div> </div> </div> <div class="astra-mm-option-container field-mm-color" <?php echo $mm_container_style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> > <h2 class="astra-mm-option-heading"><?php esc_html_e( 'Override Colors for this Mega Menu?', 'astra-addon' ); ?></h2> <div class="astra-mm-settings-wrap field-mm-text-color"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Text/Link Color', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="text" data-alpha="true" class="astra-wp-color-input" id="edit-menu-item-megamenu_text_color-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_text_color" value="<?php echo esc_attr( $megamenu_text_color ); ?>"/> </div> </div> <div class="astra-mm-settings-wrap field-mm-text-hover-color"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Text/Link Hover Color', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="text" data-alpha="true" class="astra-wp-color-input" id="edit-menu-item-megamenu_text_h_color-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_text_h_color" value="<?php echo esc_attr( $megamenu_text_h_color ); ?>"/> </div> </div> <div class="astra-mm-settings-wrap field-mm-column-div-color"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Column Divider Color', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="text" data-alpha="true" class="astra-wp-color-input" id="edit-menu-item-megamenu_column_divider_color-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_column_divider_color" value="<?php echo esc_attr( $megamenu_column_divider_color ); ?>"/> </div> </div> </div> <div class="astra-mm-option-container field-mm-content-src <?php echo esc_attr( $parent_container_class ); ?>" > <h2 class="astra-mm-option-heading"><?php esc_html_e( 'Content Source', 'astra-addon' ); ?></h2> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_content_src-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Content Source', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <?php $src = array( 'default' => __( 'Default', 'astra-addon' ), 'custom_text' => __( 'Custom Text', 'astra-addon' ), 'template' => __( 'Template', 'astra-addon' ), 'widget' => __( 'Widget', 'astra-addon' ), ); ?> <select id="edit-menu-item-megamenu_content_src-<?php echo esc_attr( $menu_item_id ); ?>" class="ast-content-src form-control ast-input" name="menu-item-megamenu_content_src" / > <?php $content_src = $megamenu_content_src; foreach ( $src as $key => $value ) { echo '<option ' . selected( $content_src, $key ) . " value='" . esc_attr( $key ) . "'>" . esc_attr( $value ) . '</option>'; } ?> </select> </div> </div> <div class="astra-mm-settings-wrap field-mm-custom-text"> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_custom_text-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Enter Custom Text', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <textarea cols="65" rows="15" class="ast-custom-text-editor" id="menu-item-megamenu_custom_text" name="menu-item-megamenu_custom_text"><?php echo esc_textarea( $megamenu_custom_text ); ?></textarea> </div> </div> <div class="astra-mm-settings-wrap field-mm-template"> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_template-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Template', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <select id="edit-menu-item-megamenu_template-<?php echo esc_attr( $menu_item_id ); ?>" class="form-control ast-input ast-select2-container" name="menu-item-megamenu_template" / > <?php if ( ! empty( $megamenu_template ) ) { $template_title = get_the_title( (int) $megamenu_template ); echo "<option selected='selected' value='" . esc_attr( $megamenu_template ) . "'>" . esc_attr( $template_title ) . '</option>'; } ?> </select> </div> </div> <div class="astra-mm-settings-wrap field-mm-widget-option"> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_widget-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Insert Widget', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <?php $widget_obj = Astra_Ext_Nav_Widget_Support::get_instance(); $widgets = $widget_obj->get_widget_list(); ?> <select id="edit-menu-item-megamenu_widget-<?php echo esc_attr( $menu_item_id ); ?>" class="form-control ast-input ast-select-widget" name="menu-item-megamenu_widget" / > <option value=""><?php esc_html_e( 'Select widget', 'astra-addon' ); ?></option> <?php foreach ( $widgets as $widget ) { echo '<option value="' . esc_attr( $widget['id'] ) . '">' . esc_attr( $widget['text'] ) . '</option>'; } ?> </select> <button class="button button-primary ast-insert-widget"><?php esc_html_e( 'Add Widget', 'astra-addon' ); ?></button> </div> </div> <div class="astra-mm-settings-wrap field-mm-widget-area"> <div class="ast-widget-list" id="ast-widget-sortable"> </div> </div> </div> <div class="astra-mm-option-container field-mm-highlight-label" > <h2 class="astra-mm-option-heading"><?php esc_html_e( 'Highlight Labels', 'astra-addon' ); ?></h2> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_highlight_label-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Menu Highlight Label', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="text" class="ast-mm-input" id="edit-menu-item-megamenu_highlight_label-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_highlight_label" / value="<?php echo esc_attr( $megamenu_highlight_label ); ?>" > </div> </div> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Highlight Label Color', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="text" data-alpha="true" class="ast-mm-input astra-wp-color-input" id="edit-menu-item-megamenu_label_color-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_label_color" value="<?php echo esc_attr( $megamenu_label_color ); ?>"/> </div> </div> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label> <?php esc_html_e( 'Highlight Label Background Color', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container"> <input type="text" data-alpha="true" class="ast-mm-input astra-wp-color-input" id="edit-menu-item-megamenu_label_bg_color-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_label_bg_color" value="<?php echo esc_attr( $megamenu_label_bg_color ); ?>"/> </div> </div> </div> <div class="astra-mm-option-container field-mm-highlight-label field-mm-advanced-options" > <h2 class="astra-mm-option-heading"><?php esc_html_e( 'Advanced', 'astra-addon' ); ?></h2> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_margin_top-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Margin (in px)', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container spacing-wrapper"> <ul class="ast-mm-spacing-wrap"> <li clas="spacing-input-item"> <input type="number" class="ast-mm-input" id="edit-menu-item-megamenu_margin_top-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_margin_top" / value="<?php echo esc_attr( $megamenu_margin_top ); ?>" > <span class="ast-spacing-title"> <?php esc_html_e( 'Top', 'astra-addon' ); ?> </span> </li> <li clas="spacing-input-item"> <input type="number" class="ast-mm-input" id="edit-menu-item-megamenu_margin_right-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_margin_right" / value="<?php echo esc_attr( $megamenu_margin_right ); ?>" > <span class="ast-spacing-title"> <?php esc_html_e( 'Right', 'astra-addon' ); ?> </span> </li> <li clas="spacing-input-item"> <input type="number" class="ast-mm-input" id="edit-menu-item-megamenu_margin_bottom-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_margin_bottom" / value="<?php echo esc_attr( $megamenu_margin_bottom ); ?>" > <span class="ast-spacing-title"> <?php esc_html_e( 'Bottom', 'astra-addon' ); ?> </span> </li> <li clas="spacing-input-item"> <input type="number" class="ast-mm-input" id="edit-menu-item-megamenu_margin_left-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_margin_left" / value="<?php echo esc_attr( $megamenu_margin_left ); ?>" > <span class="ast-spacing-title"> <?php esc_html_e( 'Left', 'astra-addon' ); ?> </span> </li> </ul> </div> </div> <div class="astra-mm-settings-wrap"> <div class="ast-mm-label-container"> <label for="edit-menu-item-megamenu_padding_top-<?php echo esc_attr( $menu_item_id ); ?>"> <?php esc_html_e( 'Padding (in px)', 'astra-addon' ); ?> </label> </div> <div class="astra-option-input-container spacing-wrapper"> <ul class="ast-mm-spacing-wrap"> <li clas="spacing-input-item"> <input type="number" class="ast-mm-input" id="edit-menu-item-megamenu_padding_top-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_padding_top" / value="<?php echo esc_attr( $megamenu_padding_top ); ?>" > <span class="ast-spacing-title"> <?php esc_html_e( 'Top', 'astra-addon' ); ?> </span> </li> <li clas="spacing-input-item"> <input type="number" class="ast-mm-input" id="edit-menu-item-megamenu_padding_right-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_padding_right" / value="<?php echo esc_attr( $megamenu_padding_right ); ?>" > <span class="ast-spacing-title"> <?php esc_html_e( 'Right', 'astra-addon' ); ?> </span> </li> <li clas="spacing-input-item"> <input type="number" class="ast-mm-input" id="edit-menu-item-megamenu_padding_bottom-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_padding_bottom" / value="<?php echo esc_attr( $megamenu_padding_bottom ); ?>" > <span class="ast-spacing-title"> <?php esc_html_e( 'Bottom', 'astra-addon' ); ?> </span> </li> <li clas="spacing-input-item"> <input type="number" class="ast-mm-input" id="edit-menu-item-megamenu_padding_left-<?php echo esc_attr( $menu_item_id ); ?>" name="menu-item-megamenu_padding_left" / value="<?php echo esc_attr( $megamenu_padding_left ); ?>" > <span class="ast-spacing-title"> <?php esc_html_e( 'Left', 'astra-addon' ); ?> </span> </li> </ul> </div> </div> </div> </div> <div class="astra-mm-cta-wrap"> <div class="alignright"> <span class="spinner"></span> <a data-label="<?php esc_html_e( 'Save', 'astra-addon' ); ?>" class="button button-primary button-large astra-megamenu-save-opts"><?php esc_html_e( 'Save', 'astra-addon' ); ?></a> <a class="button button-primary button-large astra-megamenu-cancel-btn"> <?php esc_html_e( 'Cancel', 'astra-addon' ); ?> </a> </div> </div> <?php $html = ob_get_clean(); wp_send_json_success( $html ); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.6.0 | Introduced. |