Astra_Ext_Advanced_Headers_Markup::header_custom_menu_text( html $value )

Advanced Header Custom Menu Text/HTML


Description


Parameters

$value

(html) (Required) Custom menu text/html.


Return

(html)


Source

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

		public function header_custom_menu_text( $value ) {

			$custom_menu_item = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_design_option( 'custom-menu-item' );
			if ( ! ( self::advanced_header_enabled() ) || ( is_front_page() && 'posts' == get_option( 'show_on_front' ) ) || 'default' == $custom_menu_item || '' == $custom_menu_item ) {
				return $value;
			}

			$custom_html         = '';
			$custom_html_content = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_design_option( 'custom-menu-item-text-html' );

			if ( ! empty( $custom_html_content ) ) {
				$custom_html = do_shortcode( $custom_html_content );
			} elseif ( current_user_can( 'edit_theme_options' ) ) {
				$id              = Astra_Ext_Advanced_Headers_Data::get_current_page_header_ids();
				$page_header_url = get_edit_post_link( $id );
				$custom_html     = '<a href="' . esc_url( $page_header_url ) . '">' . __( 'Add Custom HTML', 'astra-addon' ) . '</a>';
			}
			return html_entity_decode( $custom_html, ENT_COMPAT, 'UTF-8' );
		}


User Contributed Notes

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