<?php



/**



 * WNagish Express front end functions



 *



 * @package WNEPRO



 */



error_reporting(0);



if ( ! function_exists( 'wp_access_helper_body_class' ) ) {



	/**



	 * WNEPRO add body classes



	 *



	 * @param  array $classes classes list.



	 * @return array          new classes list



	 */



	function wp_access_helper_body_class( $classes ) {



		if ( wnexpress_visibility_valid() ) {







			global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;



			if ( $is_lynx ) {



				$classes[] = 'lynx';



			} elseif ( $is_gecko ) {



				$classes[] = 'gecko';



			} elseif ( $is_opera ) {



				$classes[] = 'opera';



			} elseif ( $is_NS4 ) {



				$classes[] = 'ns4';



			} elseif ( $is_safari ) {



				$classes[] = 'safari';



			} elseif ( $is_chrome ) {



				$classes[] = 'chrome';



			} elseif ( $is_IE ) {



				$classes[] = 'ie';



				if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/MSIE ( [0-11]+ )( [a-zA-Z0-9.]+ )/', wp_unslash( $_SERVER['HTTP_USER_AGENT'] ), $browser_version ) ) {



					$classes[] = 'ie' . $browser_version[1];



				}



			} else {



				$classes[] = 'unknown';



			}



			if ( $is_iphone ) {



				$classes[] = 'iphone';



			}







			if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && stristr( $_SERVER['HTTP_USER_AGENT'], 'mac' ) ) {



				$classes[] = 'osx';



			} elseif ( isset( $_SERVER['HTTP_USER_AGENT'] ) && stristr( $_SERVER['HTTP_USER_AGENT'], 'linux' ) ) {



				$classes[] = 'linux';



			} elseif ( isset( $_SERVER['HTTP_USER_AGENT'] ) && stristr( $_SERVER['HTTP_USER_AGENT'], 'windows' ) ) {



				$classes[] = 'windows';



			}







			$classes[] = 'wp-nagish-express';



			if ( wp_is_mobile() ) {



				$classes[] = 'wah-mobile';



			}



			$contrast_setup        = wah_get_param( 'wna_contrast_setup' ) ? wah_get_param( 'wna_contrast_setup' ) : 1;



			$font_setup_type       = wah_get_param( 'wne_font_setup_type' ) ? 'script' : 'script';



			$remove_styles_setup   = wah_get_param( 'wne_remove_styles_setup' ) ? wah_get_param( 'wne_remove_styles_setup' ) : 0;



			$location_setup        = wah_get_param( 'wne_left_side' ) ? 'left' : 'right';



			$underline_links_setup = wah_get_param( 'wne_underline_links_setup' ) ? wah_get_param( 'wne_underline_links_setup' ) : 1;



			$wne_left_side         = wah_get_param( 'wne_left_side' );



			$wah_enable_icons      = wah_get_param( 'wah_enable_icons' );



			$wah_sidebar_layout    = wah_get_user_wahstyle();



			$wne_statement_enable  = 1;



			$wne_darktheme_enable  = 0;







			if ( $wne_darktheme_enable ) {



				$classes[] = 'nagishx-dark-theme';



			} else {



				$classes[] = 'nagishx-light-theme';



			}



			if ( $contrast_setup ) {



				$classes[] = 'accessibility-contrast_mode_on'; }



			if ( $font_setup_type ) {



				$classes[] = 'wah_fstype_' . $font_setup_type; }



			if ( $remove_styles_setup ) {



				$classes[] = 'accessibility-remove-styles-setup'; }



			if ( $underline_links_setup ) {



				$classes[] = 'accessibility-underline-setup'; }



			if ( $wah_enable_icons ) {



				$classes[] = 'nagishx-icon-font'; }



			if ( $wne_statement_enable ) {



				$classes[] = 'wne_statement_enabled'; }



			if ( 'left' === $location_setup ) {



				$classes[] = 'accessibility-location-left';



			} else {



				$classes[] = 'accessibility-location-right';



			}



			// sidebar layout selector.



			$classes[] = 'nagishx-' . $wah_sidebar_layout;



			



		}







		return $classes;



	}



	add_filter( 'body_class', 'wp_access_helper_body_class' );



}







add_action( 'wp', 'wah_analyzer' );



/**



 * WNEPRO Analyzer



 */



function wah_analyzer() {



	if ( wah_analyzer_isset() && wne_admin_only() ) {



		run_front_dom_scanner();



	} elseif ( wah_analyzer_isset() && ! wne_admin_only() ) {



		echo "<h1 style='text-align:center;'>" . esc_html__( 'You do NOT have permissions to access this page', 'wp-nagish-express' ) . '</h1>';



		echo "<h3 style='text-align:center;'>" . esc_html__( 'Please contact site administrator.', 'wp-nagish-express' ) . '</h3>';



		die();



	}



}



/**



 * Render widgets list



 */



function wah_render_enabled_widgets_list() {



	$enabled_widgets    = wah_calculate_enabled_widgets();



	$wah_sidebar_layout = wah_get_user_wahstyle();



	$args               = wnexpress_get_front_widgets_settings();



	if ( 'wide-sidebar' === $wah_sidebar_layout ) {



		



	}



	if ( 'wah-modern' === $wah_sidebar_layout ) {



		include 'modern-layout/toc.php';



		include 'modern-layout/toggle-dark-mode.php';



		include 'modern-layout/profiles.php';







		echo '<div class="nagishx-switches-wrapper nagishx-profiles">';



		foreach ( $wah_default_front_widget as $id => $wah_widget ) {



			if ( $wah_widget['html'] && $wah_widget['active'] ) {



				echo $wah_widget['html']; // phpcs:ignore



			}



		}



		unset( $wah_default_front_widget['widget-17'] ); // remove monochrome.



		unset( $wah_default_front_widget['widget-18'] ); // remove sepia.



		unset( $wah_default_front_widget['widget-2'] ); // remove Keyboard navigation.



		unset( $wah_default_front_widget['widget-22'] ); // remove ADHD Profile.



		unset( $wah_default_front_widget['widget-28'] ); // remove CD Profile.



		unset( $wah_default_front_widget['widget-29'] ); // remove Vision Impaired Profile.



		echo '</div>';







		include 'modern-layout/modern-widgets-fonts-settings.php';



		echo '<div class="nagishx-font-settings-wrapper">';



		foreach ( $wah_font_settings_widget as $id => $wah_widget ) {



			if ( $wah_widget['html'] ) {



				if ( 'widget-1' === $id ) {



					echo '<div class="font-size-settings-inner">';



						echo $wah_widget['html'];



					echo '</div>';



				} elseif ( 'widget-23' === $id ) {



					echo '<div class="font-alignment-settings-inner">';



						echo $wah_widget['html'];



					echo '</div>';



				} else {



					echo $wah_widget['html'];



				}



			}



		}



		echo '</div>';







		include 'modern-layout/toggle-colors-adjustment.php';







		echo '<div class="nagishx-modern-contrast-container" >';



		include 'modern-layout/adjust-contrast-settings.php';



		echo '<div class="nagishx-modern-contrast-settings">';



		foreach ( $wah_contrast_widget as $id => $widget ) {



			if ( $widget['html'] ) {



				echo $widget['html'];



			}



		}



		echo '</div>';







		include 'modern-layout/adjust-title-colors.php';



		echo '<div class="nagishx-modern-title-colors-settings">';



		foreach ( $wah_title_colors as $id => $widget ) {



			if ( $widget['html'] ) {



				echo $widget['html'];



			}



		}



		echo '</div>';







		include 'modern-layout/adjust-text-colors.php';



		echo '<div class="nagishx-modern-text-colors-settings">';



		foreach ( $wah_text_colors as $id => $widget ) {



			if ( $widget['html'] ) {



				echo $widget['html'];



			}



		}



		echo '</div>';







		include 'modern-layout/adjust-link-colors.php';



		echo '<div class="nagishx-modern-link-colors-settings">';



		foreach ( $wah_link_colors as $id => $widget ) {



			if ( $widget['html'] ) {



				echo $widget['html'];



			}



		}



		echo '</div>';



		echo '</div>';







		include 'modern-layout/text-preferences-profile.php';



		echo '<div class="nagishx-switches-wrapper text-preferences-profile">';



		foreach ( $wah_default_front_widget as $id => $wah_widget ) {



			if ( $wah_widget['html'] && $wah_widget['active'] ) {



				echo $wah_widget['html']; // phpcs:ignore



			}



		}



		unset( $wah_default_front_widget['widget-21'] ); // remove letter_spacing module.



		unset( $wah_default_front_widget['widget-26'] ); // remove word_spacing module.



		unset( $wah_default_front_widget['widget-27'] ); // remove line_height module.



		echo '</div>';







		include 'modern-layout/modern-widgets-switches.php';



		echo '<div class="nagishx-switches-wrapper">';



		foreach ( $wah_default_front_widget as $id => $wah_widget ) {



			if ( $wah_widget['html'] && $wah_widget['active'] ) {



				echo $wah_widget['html'];



			}



		}



		echo '</div>';







		



	} else {



		$colorSetting = "";



		$colorSetting .= "<div class='wne-acs-wrap'>";



			ob_start();



			include 'modern-layout/toggle-colors-adjustment.php';



			$colorSetting .= ob_get_clean(); // 



			$icon_widget8                         = icons_enabled() ? '<span class="widget-icon ">

			<i class="flaticon-system"></i>



			</span>' : '';



			$wne_greyscale_title  = wah_get_param( 'wne_greyscale_title' ) ? wah_get_param( 'wne_greyscale_title' ) : __( 'תמונות בגוון אפור', 'wp-nagish-express' );



			$colorSetting .= '<div class="nagishx-modern-contrast-container" >';



					$colorSetting .= '<div class="nagishx-modern-contrast-settings">



							<div class="a_module_exe">



								<button tabindex="-1" data-widgetid="widget-8" type="button" id="greyscale" class="greyscale wne-action-button wahout wne-call-greyscale"



								aria-label="' . $wne_greyscale_title . '" title="' . $wne_greyscale_title . '"><span class="wne-button-title">' . $wne_greyscale_title . '</span>' . $icon_widget8 . '</button>



							</div>



						</div>';



			







			



			ob_start();



			include 'modern-layout/adjust-contrast-settings.php';



			$colorSetting .= ob_get_clean(); // 



			$colorSetting .= '<div class="nagishx-modern-contrast-settings">';



			foreach ( $wah_contrast_widget as $id => $widget ) {



				if ( $widget['html'] ) {



					$colorSetting .= $widget['html'];



				}



			}



			$colorSetting .= '</div>';



			ob_start();



			include 'modern-layout/adjust-title-colors.php';



			$colorSetting .= ob_get_clean(); // 



			$colorSetting .= '<div class="nagishx-modern-title-colors-settings">';



			foreach ( $wah_title_colors as $id => $widget ) {



				if ( $widget['html'] ) {



					$colorSetting .= $widget['html'];



				}



			}



			$colorSetting .= '</div>';



			ob_start();



			include 'modern-layout/adjust-text-colors.php';



			$colorSetting .= ob_get_clean(); // 



			$colorSetting .= '<div class="nagishx-modern-text-colors-settings">';



			foreach ( $wah_text_colors as $id => $widget ) {



				if ( $widget['html'] ) {



					$colorSetting .= $widget['html'];



				}



			}



			$colorSetting .= '</div>';



			ob_start();



			include 'modern-layout/adjust-link-colors.php';



			$colorSetting .= ob_get_clean(); // 



			$colorSetting .= '<div class="nagishx-modern-link-colors-settings">';



			foreach ( $wah_link_colors as $id => $widget ) {



				if ( $widget['html'] ) {



					$colorSetting .= $widget['html'];



				}



			}



			$colorSetting .= '</div>';



			$colorSetting .= '</div>';



			$colorSetting .= '</div>';



			



		foreach ( $enabled_widgets as $id => $wah_widget ) {



			



			if ( $wah_widget['html'] ) {



				if ( 'widget-7' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-22' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-28' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-2before' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-2' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				



				if ( 'widget-6' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-6before' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-26' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-10' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-5' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-14' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-21' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-27' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-16' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-25' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-19' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-24' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-3' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-1' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-23' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				



				



			}



		}



				if(!empty($colorSetting)){



					echo $colorSetting;



				}



		foreach ( $enabled_widgets as $id => $wah_widget ) {



			



			if ( $wah_widget['html'] ) {



				



				if ( 'widget-9' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-18' == $id ) {



					



						echo $wah_widget['html'];



					



				}



				if ( 'widget-17' == $id ) {



					



						echo $wah_widget['html'];



					



				}



			}



		}



		



		



		



		



	}



	if ( 'wide-sidebar' === $wah_sidebar_layout ) {



		include 'modern-layout/toc.php';



		



		



		



		



	}



}



/**



 * Front DOM scanner scripts



 */



function run_front_dom_scanner() {



	wp_register_style( 'wah_analyzer-styles', plugins_url() . '/nagish-accessibility/admin/wah-analyzer/style.css', array(), NAGISHX_VERSION );



	wp_enqueue_style( 'wah_analyzer-styles' );







	wp_localize_script( 'wah_analyzer-js', 'ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );



	wp_register_script( 'wah_analyzer-js', plugins_url() . '/nagish-accessibility/admin/wah-analyzer/wah_analyzer.js', array( 'jquery' ), NAGISHX_VERSION, true );



	wp_enqueue_script( 'wah_analyzer-js' );



}



/**



 * Get attachment id by image source



 *



 * @param  string $url url.



 * @return int      id



 */



function get_attachment_id( $url ) {







	$attachment_id = 0;



	$dir           = wp_upload_dir();







	if ( false !== strpos( $url, $dir['baseurl'] . '/' ) ) { // Is URL in uploads directory?







		$file       = basename( $url );



		$query_args = array(



			'post_type'   => 'attachment',



			'post_status' => 'inherit',



			'fields'      => 'ids',



			'meta_query'  => array(



				array(



					'value'   => $file,



					'compare' => 'LIKE',



					'key'     => '_wp_attachment_metadata',



				),



			),



		);







		$query = new WP_Query( $query_args );



		if ( $query->have_posts() ) {



			foreach ( $query->posts as $post_id ) {







				$meta                = wp_get_attachment_metadata( $post_id );



				$original_file       = basename( $meta['file'] );



				$cropped_image_files = wp_list_pluck( $meta['sizes'], 'file' );







				if ( $original_file === $file || in_array( $file, $cropped_image_files, true ) ) {



					$attachment_id = $post_id;



					break;



				}



			}



		}



	}



	return $attachment_id;



}



/**



 * Analyzer Access



 */



function wah_analyzer_isset() {



	if ( isset( $_GET['wah_analyzer'] ) && $_GET['wah_analyzer'] == 'wah' ) {



		return true;



	}



	return false;



}



/**



 * Admin only WAH access



 */



function wne_admin_only() {



	if ( current_user_can( 'administrator' ) ) {



		return true;



	}



	return false;



}



/**



 * Check if icons are enabled



 */



function icons_enabled() {



	return true;



}



/**



 * WAH Widgets list settings



 *



 * @return array widgets settings



 */



function wnexpress_get_front_widgets_settings() {



	$contrast_setup             = 1;



	$choose_color_title         = wah_get_param( 'wne_choose_color_title' ) ? wah_get_param( 'wne_choose_color_title' ) : __( 'בחר צבע', 'wp-nagish-express' );



	$custom_contrast_variations = wah_get_param( 'wah_enable_custom_contrast' );







	$underline_links_setup       = 1;



	$underline_links_setup_title = wah_get_param( 'wne_underline_links_setup_title' ) ? wah_get_param( 'wne_underline_links_setup_title' ) : __( 'הדגשת קישורים', 'wp-nagish-express' );



	$role_links_setup            = wah_get_param( 'wne_role_links_setup' );



	$remove_link_titles          = wah_get_param( 'wne_remove_link_titles' );



	$remove_styles_setup         = wah_get_param( 'wne_remove_styles_setup' );



	$remove_styles_setup_title   = wah_get_param( 'wne_remove_styles_setup_title' ) ? wah_get_param( 'wne_remove_styles_setup_title' ) : __( 'הסר עיצובים', 'wp-nagish-express' );



	$close_button_title          = wah_get_param( 'wne_close_button_title' ) ? wah_get_param( 'wne_close_button_title' ) : __( 'סגור', 'wp-nagish-express' );







	$wne_clear_cookies_title = wah_get_param( 'wne_clear_cookies_title' ) ? wah_get_param( 'wne_clear_cookies_title' ) : __( 'נקה עוגיות', 'wp-nagish-express' );







	$wne_greyscale_enable = 1;







	$wne_greyscale_title  = wah_get_param( 'wne_greyscale_title' ) ? wah_get_param( 'wne_greyscale_title' ) : __( 'תמונות בגוון אפור', 'wp-nagish-express' );







	$wne_highlight_links_enable = 1;



	$wah_highlight_title        = wah_get_param( 'wne_highlight_links_title' ) ? wah_get_param( 'wne_highlight_links_title' ) : __( 'סמן קישורים עם צבע רקע?', 'wp-nagish-express' );







	$wne_invert_enable = 1;



	$wne_invert_title  = wah_get_param( 'wne_invert_title' ) ? wah_get_param( 'wne_invert_title' ) : __( 'ניגודיות', 'wp-nagish-express' );







	$wne_remove_animations_setup = 1;



	$wne_remove_animations_title = wah_get_param( 'wne_remove_animations_title' ) ? wah_get_param( 'wne_remove_animations_title' ) : __( 'ביטול הנפשות', 'wp-nagish-express' );







	$wne_readable_fonts_setup = 1;



	$wne_readable_fonts_title = wah_get_param( 'wne_readable_fonts_title' ) ? wah_get_param( 'wne_readable_fonts_title' ) : __( 'פונט קריא', 'wp-nagish-express' );











	$wne_speech_button_setup = 1;



	$wne_speech_button_title = wah_get_param( 'wne_speech_button_title' ) ? wah_get_param( 'wne_speech_button_title' ) : __( 'קורא מסך', 'wp-nagish-express' );



	



	$wne_large_text_setup = 1;



	$wne_large_text_title = wah_get_param( 'wne_large_text_title' ) ? wah_get_param( 'wne_large_text_title' ) : __( 'הגדלת טקסטים', 'wp-nagish-express' );







	$wne_keyboard_navigation_setup = 1;



	$wne_keyboard_navigation_title = wah_get_param( 'wne_keyboard_navigation_title' ) ? wah_get_param( 'wne_keyboard_navigation_title' ) : __( 'ניווט מקלדת', 'wp-nagish-express' );







	$wne_lights_off_setup = wah_get_param( 'wne_lights_off_setup' );



	$wne_lights_off_title = wah_get_param( 'wne_lights_off_title' ) ? wah_get_param( 'wne_lights_off_title' ) : __( 'כיבוי אורות', 'wp-nagish-express' );







	$wah_highlight_titles_setup = wah_get_param( 'wah_highlight_titles_setup' );



	$wah_highlight_titles_title = wah_get_param( 'wah_highlight_titles_title' ) ? wah_get_param( 'wah_highlight_titles_title' ) : __( 'Highlight titles', 'wp-nagish-express' );







	$wne_image_alt_setup = 1;



	$wah_image_alt_title = wah_get_param( 'wah_image_alt_title' ) ? wah_get_param( 'wah_image_alt_title' ) : __( 'תאורים', 'wp-nagish-express' );







	$wah_enable_terms_link = wah_get_param( 'wah_enable_terms_link' );



	$wah_custom_link_title = wah_get_param( 'wah_custom_link_title' );



	$wah_custom_link_url   = wah_get_param( 'wah_custom_link_url' );



	$wah_custom_link       = false;



	if ( $wah_enable_terms_link && $wah_custom_link_title && $wah_custom_link_url ) {



		$wah_custom_link = true;



	}







	// Large mouse cursor.



	$wah_enable_large_mouse_cursor = 1;



	$wah_large_mouse_cursor_title  = wah_get_param( 'wah_large_mouse_cursor_title' ) ? wah_get_param( 'wah_large_mouse_cursor_title' ) : __( 'סמן', 'wp-nagish-express' );







	// Font resize.



	// $wah_sidebar_layout = wah_get_param( 'wah_sidebar_layout' );.



	$wah_sidebar_layout = wah_get_user_wahstyle();







	$reset_font_size_title = wah_get_param( 'wne_reset_font_size' ) ? wah_get_param( 'wne_reset_font_size' ) : __( 'אפס הגדרות גופן', 'wp-nagish-express' );



	$font_setup_type       = wah_get_param( 'wne_font_setup_type' ) ? 'script' : 'script';



	$reset_button          = '';



	$icon_reset            = icons_enabled() ? '<span class="widget-icon">

	<i class="flaticon-refresh"></i>



</span>' : '';







	if ( 'script' === $font_setup_type ) {



		$reset_button = '<button tabindex="-1" type="button" class="wne-action-button wne-font-reset wahout" title="' . $reset_font_size_title . '" aria-label="' . $reset_font_size_title . '">' . $icon_reset . '<span class="wne-button-title">' . $reset_font_size_title . '</span></button>';



	}







	$wne_enable_monochrome_mode = 1;



	$wah_monochrome_mode_title  = wah_get_param( 'wah_monochrome_mode_title' ) ? wah_get_param( 'wah_monochrome_mode_title' ) : __( 'חום כהה', 'wp-nagish-express' );







	$wne_enable_sepia_mode = 1;



	$wah_sepia_mode_title  = wah_get_param( 'wah_sepia_mode_title' ) ? wah_get_param( 'wah_sepia_mode_title' ) : __( 'מונוכרום', 'wp-nagish-express' );







	$wah_enable_inspector_mode = 1;



	$wah_inspector_mode_title  = wah_get_param( 'wah_inspector_mode_title' ) ? wah_get_param( 'wah_inspector_mode_title' ) : __( 'מבנה הדף', 'wp-nagish-express' );







	$wah_set_layout_setup       = wah_get_param( 'wah_set_layout_setup' );



	$wah_set_layout_title       = wah_get_param( 'wah_set_layout_title' ) ? wah_get_param( 'wah_set_layout_title' ) : __( 'Select Theme', 'wp-nagish-express' );



	$wah_set_layout_popup_title = wah_get_param( 'wah_set_layout_popup_title' ) ? wah_get_param( 'wah_set_layout_popup_title' ) : __( 'Select Theme', 'wp-nagish-express' );







	// Letter spacing.



	$wne_enable_letter_spacing_mode = 1;



	$wne_letter_spacing_title       = wah_get_param( 'wne_letter_spacing_title' ) ? wah_get_param( 'wne_letter_spacing_title' ) : __( 'ריווח טקסט', 'wp-nagish-express' );







	// ADHD.



	$wah_enable_adhd       = 1;



	$wah_adhd_button_title = wah_get_param( 'wah_adhd_button_title' ) ? wah_get_param( 'wah_adhd_button_title' ) : __( 'ADHD פרופיל', 'wp-nagish-express' );







	// Cognitive Disability Profile.



	$wne_enable_cd_profile       = wah_get_param( 'wne_enable_cd_profile' );



	$wah_cd_profile_button_title = wah_get_param( 'wah_cd_profile_button_title' ) ? wah_get_param( 'wah_cd_profile_button_title' ) : __( 'פרופיל מוגבלות קוגנטיבית', 'wp-nagish-express' );



	$wah_cd_profile_description  = wah_get_param( 'wah_cd_profile_description' ) ? wah_get_param( 'wah_cd_profile_description' ) : '';







	// MUTE.



	$wne_enable_mute       = 1;



	$wah_mute_button_title = wah_get_param( 'wah_mute_button_title' ) ? wah_get_param( 'wah_mute_button_title' ) : __( ' השתק קול', 'wp-nagish-express' );







	// Text alignment.



	$wah_text_alignment        = 1;



	$wne_text_alignment_center = wah_get_param( 'wne_text_alignment_center' ) ? wah_get_param( 'wne_text_alignment_center' ) : __( 'יישר למרכז', 'wp-nagish-express' );



	$wne_text_alignment_left   = wah_get_param( 'wne_text_alignment_left' ) ? wah_get_param( 'wne_text_alignment_left' ) : __( 'יישר שמאלה', 'wp-nagish-express' );



	$wne_text_alignment_right  = wah_get_param( 'wne_text_alignment_right' ) ? wah_get_param( 'wne_text_alignment_right' ) : __( 'יישר ימינה', 'wp-nagish-express' );







	// Hide images.



	$wne_enable_hide_images      = 1;



	$wne_toc      = 1;



	$wah_hide_image_button_title = wah_get_param( 'wah_hide_image_button_title' ) ? wah_get_param( 'wah_hide_image_button_title' ) : __( 'הסתר תמונות', 'wp-nagish-express' );







	// Word spacing.



	$wne_enable_word_spacing       = 1;



	



	$wah_word_spacing_button_title  = wah_get_param( 'wah_word_spacing_button_title' ) ? wah_get_param( 'wah_word_spacing_button_title' ) : __( 'ריווח טקסט', 'wp-nagish-express' );



	// Line height.



	$wne_enable_line_height       = 1;



	



	$wah_line_height_button_title  = wah_get_param( 'wah_line_height_button_title' ) ? wah_get_param( 'wah_line_height_button_title' ) : __( 'גובה שורה', 'wp-nagish-express' );



	$wah_adjust_background_colors_title = wah_get_param( 'wah_adjust_background_colors_title' );



	$wah_adjust_title_colors_title      = wah_get_param( 'wah_adjust_title_colors_title' );



	$wah_adjust_text_colors_title       = wah_get_param( 'wah_adjust_text_colors_title' );



	$wah_adjust_link_colors_title       = wah_get_param( 'wah_adjust_link_colors_title' );







	$wne_keyboard_navigation_description = wah_get_param( 'wne_keyboard_navigation_description' );



	$wne_underline_links_description     = wah_get_param( 'wne_underline_links_description' );



	$wne_highlight_links_description     = wah_get_param( 'wne_highlight_links_description' );



	$wah_images_greyscale_description    = wah_get_param( 'wah_images_greyscale_description' );



	$wne_invert_colors_description       = wah_get_param( 'wne_invert_colors_description' );







	$wne_remove_animations_description  = wah_get_param( 'wne_remove_animations_description' );



	$wah_remove_styles_description      = wah_get_param( 'wah_remove_styles_description' );



	$wah_highlight_titles_description   = wah_get_param( 'wah_highlight_titles_description' );



	$wah_images_description_description = wah_get_param( 'wah_images_description_description' );







	$wne_large_cursor_description = wah_get_param( 'wne_large_cursor_description' );



	$wah_monochrome_description   = wah_get_param( 'wah_monochrome_description' );



	$wah_sepia_description        = wah_get_param( 'wah_sepia_description' );



	$wah_inspector_description    = wah_get_param( 'wah_inspector_description' );







	$wne_letter_spacing_description = wah_get_param( 'wne_letter_spacing_description' );



	$wne_adhd_profile_description   = wah_get_param( 'wne_adhd_profile_description' );



	$wah_mute_volume_description    = wah_get_param( 'wah_mute_volume_description' );



	$wah_hide_images_description    = wah_get_param( 'wah_hide_images_description' );







	$wah_word_spacing_description = wah_get_param( 'wah_word_spacing_description' );



	$wah_line_height_description  = wah_get_param( 'wah_line_height_description' );







	$wne_toc_title                 = wah_get_param( 'wne_toc_title' );



	$wah_dark_light_scheme         = wah_get_param( 'wah_dark_light_scheme' );



	



	$wah_color_adjustment_settings = wah_get_param( 'wah_color_adjustment_settings' ) ? wah_get_param( 'wah_color_adjustment_settings' ) : __( 'Color settings', 'wp-nagish-express' );



	







	$wah_vision_impaired_profile_title = wah_get_param( 'wah_vision_impaired_profile_title' );



	$wah_vision_impaired_description   = wah_get_param( 'wah_vision_impaired_description' );







	$settings = array(



		'contrast_setup'                      => $contrast_setup,



		'choose_color_title'                  => $choose_color_title,



		'custom_contrast_variations'          => $custom_contrast_variations,



		'underline_links_setup'               => $underline_links_setup,



		'underline_links_setup_title'         => $underline_links_setup_title,



		'role_links_setup'                    => $role_links_setup,



		'remove_link_titles'                  => $remove_link_titles,



		'remove_styles_setup'                 => $remove_styles_setup,



		'remove_styles_setup_title'           => $remove_styles_setup_title,



		'close_button_title'                  => $close_button_title,



		'wne_clear_cookies_title'             => $wne_clear_cookies_title,



		'wne_greyscale_enable'                => $wne_greyscale_enable,



		'wne_greyscale_title'                 => $wne_greyscale_title,



		'wne_highlight_links_enable'          => 1,



		'wah_highlight_title'                 => $wah_highlight_title,



		'wne_invert_enable'                   => $wne_invert_enable,



		'wne_invert_title'                    => $wne_invert_title,



		'wne_remove_animations_setup'         => 1,



		'wne_remove_animations_title'         => $wne_remove_animations_title,



		'wne_readable_fonts_setup'            => $wne_readable_fonts_setup,



		'wne_readable_fonts_title'            => $wne_readable_fonts_title,



		'wne_speech_button_setup' 		      => $wne_speech_button_setup,



		'wne_speech_button_title'       	  => $wne_speech_button_title,



		'wne_large_text_setup' 		    	  => $wne_large_text_setup,



		'wne_large_text_title'       		  => $wne_large_text_title,				



		'wne_keyboard_navigation_setup'       => $wne_keyboard_navigation_setup,



		'wne_keyboard_navigation_title'       => $wne_keyboard_navigation_title,



		'wne_lights_off_setup'                => $wne_lights_off_setup,



		'wne_lights_off_title'                => $wne_lights_off_title,



		'wah_highlight_titles_setup'          => $wah_highlight_titles_setup,



		'wah_highlight_titles_title'          => $wah_highlight_titles_title,



		'wne_image_alt_setup'                 => 1,



		'wah_image_alt_title'                 => $wah_image_alt_title,



		'wah_enable_terms_link'               => $wah_enable_terms_link,



		'wah_custom_link_title'               => $wah_custom_link_title,



		'wah_custom_link_url'                 => $wah_custom_link_url,



		'wah_enable_large_mouse_cursor'       => $wah_enable_large_mouse_cursor,



		'wah_large_mouse_cursor_title'        => $wah_large_mouse_cursor_title,



		'wah_sidebar_layout'                  => $wah_sidebar_layout,



		'reset_font_size_title'               => $reset_font_size_title,



		'font_setup_type'                     => $font_setup_type,



		'icon_reset'                          => $icon_reset,



		'reset_button'                        => '<button tabindex="-1" type="button" class="wne-font-reset wahout" title="' . $reset_font_size_title . '" aria-label="' . __( 'אפס הגדרות גופן', 'wp-nagish-express' ) . '"><span class="wne-button-title">' . $reset_font_size_title . '</span>' . $icon_reset . '</button>',



		'wne_enable_monochrome_mode'          => $wne_enable_monochrome_mode,



		'wah_monochrome_mode_title'           => $wah_monochrome_mode_title,



		'wne_enable_sepia_mode'               => $wne_enable_sepia_mode,



		'wah_sepia_mode_title'                => $wah_sepia_mode_title,



		'wah_enable_inspector_mode'           => $wah_enable_inspector_mode,



		'wah_inspector_mode_title'            => $wah_inspector_mode_title,



		'wah_set_layout_setup'                => $wah_set_layout_setup,



		'wah_set_layout_title'                => $wah_set_layout_title,



		'wah_set_layout_popup_title'          => $wah_set_layout_popup_title,



		'wne_enable_letter_spacing_mode'      => 1,



		'wne_letter_spacing_title'            => $wne_letter_spacing_title,



		'wah_enable_adhd'                     => 1,



		'wah_adhd_button_title'               => $wah_adhd_button_title,



		'wne_enable_mute'                     => $wne_enable_mute,



		'wah_mute_button_title'               => $wah_mute_button_title,



		'wah_text_alignment'                  => $wah_text_alignment,



		'wne_text_alignment_center'           => $wne_text_alignment_center,



		'wne_text_alignment_left'             => $wne_text_alignment_left,



		'wne_text_alignment_right'            => $wne_text_alignment_right,



		'wne_enable_hide_images'              => $wne_enable_hide_images,



		'wne_toc'              => $wne_toc,



		'wah_hide_image_button_title'         => $wah_hide_image_button_title,



		'wah_adjust_background_colors_title'  => $wah_adjust_background_colors_title,



		'wah_adjust_title_colors_title'       => $wah_adjust_title_colors_title,



		'wah_adjust_text_colors_title'        => $wah_adjust_text_colors_title,



		'wah_adjust_link_colors_title'        => $wah_adjust_link_colors_title,



		'wne_keyboard_navigation_description' => $wne_keyboard_navigation_description,



		'wne_underline_links_description'     => $wne_underline_links_description,



		'wne_highlight_links_description'     => $wne_highlight_links_description,



		'wah_images_greyscale_description'    => $wah_images_greyscale_description,



		'wne_invert_colors_description'       => $wne_invert_colors_description,



		'wne_remove_animations_description'   => $wne_remove_animations_description,



		'wah_remove_styles_description'       => $wah_remove_styles_description,



		'wah_highlight_titles_description'    => $wah_highlight_titles_description,



		'wah_images_description_description'  => $wah_images_description_description,



		'wne_large_cursor_description'        => $wne_large_cursor_description,



		'wah_monochrome_description'          => $wah_monochrome_description,



		'wah_sepia_description'               => $wah_sepia_description,



		'wah_inspector_description'           => $wah_inspector_description,



		'wne_letter_spacing_description'      => $wne_letter_spacing_description,



		'wne_adhd_profile_description'        => $wne_adhd_profile_description,



		'wah_mute_volume_description'         => $wah_mute_volume_description,



		'wah_hide_images_description'         => $wah_hide_images_description,



		'wne_enable_word_spacing'             => 1,



		'wah_word_spacing_button_title'       => $wah_word_spacing_button_title,



		'wne_enable_line_height'              => 1,



		'wah_line_height_button_title'        => $wah_line_height_button_title,



		'wah_word_spacing_description'        => $wah_word_spacing_description,



		'wah_line_height_description'         => $wah_line_height_description,



		'wne_enable_cd_profile'               => 1,



		'wah_cd_profile_button_title'         => $wah_cd_profile_button_title,



		'wah_cd_profile_description'          => $wah_cd_profile_description,



		'wne_toc_title'                       => $wne_toc_title,



		'wah_dark_light_scheme'               => $wah_dark_light_scheme,



		'wah_color_adjustment_settings'       => $wah_color_adjustment_settings,



		'wah_vision_impaired_description'     => $wah_vision_impaired_description,



		'wah_vision_impaired_profile_title'   => $wah_vision_impaired_profile_title,



	);







	return $settings;



}



/**



 * WAH Widgets list



 *



 * @return html widgets html



 */



function wah_get_front_widgets_list() {







	$params                   = wnexpress_get_front_widgets_settings();



	$wah_default_front_widget = array();







	if ( 'wah-modern' !== $params['wah_sidebar_layout'] ) {



		// Build widgets array.



		if ( 'wah-bottom-fullwidth' !== $params['wah_sidebar_layout'] ) {



			/* =================== Widget 7 */



			$icon_widget7                         = icons_enabled() ? '<span class="widget-icon"><svg xmlns="http://www.w3.org/2000/svg" width="19.327" height="15.563" viewBox="0 0 19.327 15.563">



		  <g id="Icon_feather-refresh-cw" data-name="Icon feather-refresh-cw" transform="translate(-0.086 -3.47)">



			<path id="Path_108" data-name="Path 108" d="M30,6v4.5H25.5" transform="translate(-12 -0.748)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>



			<path id="Path_109" data-name="Path 109" d="M1.5,25.5V21H6" transform="translate(0 -8.248)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>



			<path id="Path_110" data-name="Path 110" d="M3.382,9A6.75,6.75,0,0,1,14.52,6.482L18,9.752m-16.5,3,3.48,3.27A6.75,6.75,0,0,0,16.117,13.5" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>



		  </g>



		</svg>



		</span>' : '';



				$wah_default_front_widget['widget-7'] = array(



					'active' => 1,



					'html'   => '<div class="a_module wne_clear_cookies">



						<div class="a_module_exe">



							<button tabindex="-1" data-widgetid="widget-7" type="button" class="wne-action-button wahout wne-call-clear-cookies"



							aria-label="' . $params['wne_clear_cookies_title'] . '" title="' . $params['wne_clear_cookies_title'] . '"><span class="wne-button-title">' . $params['wne_clear_cookies_title'] . '</span>' . $icon_widget7 . '</button>



						</div>



					</div>',



				);



				/* =================== Widget 22 */



				$icon_widget22 = icons_enabled() ? '<span class="widget-icon stressed">

				<i class="flaticon-adhd"></i>

			</span>' : '';



					$wah_default_front_widget['widget-22'] = array(



						'active' => $params['wah_enable_adhd'],



						'html'   => '<div class="a_module wne_enable_adhd_profile">



							<div class="a_module_exe">



								<button tabindex="-1" data-widgetid="widget-22" type="button" id="wne_adhd_profile" class="wne-action-button wahout wne-set-adhd_profile"



								aria-label="' . $params['wah_adhd_button_title'] . '"><span class="wne-button-title">' . $params['wah_adhd_button_title'] . '</span>' . $icon_widget22 . '</button>



							</div>



						</div>',



					);



					



						/* =================== Widget 28 */



					



					$icon_widget28                         = icons_enabled() ? '<span class="widget-icon">

					<i class="flaticon-idea"></i>



				</span>' : '';



						$wah_default_front_widget['widget-28'] = array(



							'active' => $params['wne_enable_cd_profile'],



							'html'   => '<div class="a_module wne_enable_cd_profile">



								<div class="a_module_exe">



									<button tabindex="-1" data-widgetid="widget-28" type="button" id="wne_enable_cd_profile" class="wne-action-button wahout set-wne_enable_cd_profile"



									aria-label="' . $params['wah_cd_profile_button_title'] . '"><span class="wne-button-title">' . $params['wah_cd_profile_button_title'] . '</span>' . $icon_widget28 . '</button>



								</div>



							</div>',



						);



					}



					



					



					



						/* =================== Widget 2before */



					



					$icon_widget2before                         = icons_enabled() ? '<span class="widget-icon">

					<i class="flaticon-microphone-black-shape"></i>



					</span>' : '';



							$wah_default_front_widget['widget-2before'] = array(



								'active' => $params['wne_speech_button_setup'],



								'html'   => '<div class="a_module wne_speech_button">



									<div class="a_module_exe">



										<button tabindex="-1" data-widgetid="widget-2before" type="button" class="wne-action-button wahout wne-call-speech_button"



										aria-label="' . $params['wne_speech_button_title'] . '" title="' . $params['wne_speech_button_title'] . '"><span class="wne-button-title">' . $params['wne_speech_button_title'] . '</span>' . $icon_widget2before . '</button>



									</div>



								</div>',



							);



					



						/* =================== Widget 2 */



					



					$icon_widget2                         = icons_enabled() ? '<span class="widget-icon">

					<i class="flaticon-keyboard"></i>



					</span>' : '';



							$wah_default_front_widget['widget-2'] = array(



								'active' => $params['wne_keyboard_navigation_setup'],



								'html'   => '<div class="a_module wne_keyboard_navigation">



									<div class="a_module_exe">



										<button tabindex="-1" data-widgetid="widget-2" type="button" class="wne-action-button wahout wne-call-keyboard-navigation"



										aria-label="' . $params['wne_keyboard_navigation_title'] . '" title="' . $params['wne_keyboard_navigation_title'] . '"><span class="wne-button-title">' . $params['wne_keyboard_navigation_title'] . '</span>' . $icon_widget2 . '</button>



									</div>



								</div>',



							);



							



							



							



							



							



							



							/* =================== Widget 6 */



							$icon_widget6                         = icons_enabled() ? '<span class=" widget-icon">

							<i class="flaticon-bucket"></i>

							

							</span>' : '';



							$wah_default_front_widget['widget-6'] = array(



								'active' => $params['wne_highlight_links_enable'],



								'html'   => '<div class="a_module wne_highlight_links">



									<div class="a_module_exe">



										<button tabindex="-1" data-widgetid="widget-6" type="button" class="wne-action-button wahout wne-call-highlight-links" aria-label="' . $params['wah_highlight_title'] . '" title="' . $params['wah_highlight_title'] . '"><span class="wne-button-title">' . $params['wah_highlight_title'] . '</span>' . $icon_widget6 . '</button>



									</div>



								</div>',



							);



							



							



							/* =================== Widget 6before */



					



					$icon_widget6before                         = icons_enabled() ? '<span class="widget-icon">

					<i class="flaticon-enlarge"></i>



					</span>' : '';



							$wah_default_front_widget['widget-6before'] = array(



								'active' => $params['wne_large_text_setup'],



								'html'   => '<div class="a_module wne_large_text">



									<div class="a_module_exe">



										<button tabindex="-1" data-widgetid="widget-6before" type="button" class="wne-action-button wahout wne-large_text_button"



										aria-label="' . $params['wne_large_text_title'] . '" title="' . $params['wne_large_text_title'] . '"><span class="wne-button-title">' . $params['wne_large_text_title'] . '</span>' . $icon_widget6before . '</button>



									</div>



								</div>',



							);



							



							



							



							/* =================== Widget 26 */



							$icon_widget26                         = icons_enabled() ? '<span class="widget-icon">

							<i class="flaticon-distribute-spacing-horizontal"></i>



							</span>' : '';



									$wah_default_front_widget['widget-26'] = array(



										'active' => $params['wne_enable_word_spacing'],



										'html'   => '<div class="a_module wne_enable_word_spacing">



											<div class="a_module_exe">



												<button tabindex="-1" data-widgetid="widget-26" type="button" id="wne_enable_word_spacing" class="wne-action-button wahout wne-set-word_spacing"



												aria-label="' . $params['wah_word_spacing_button_title'] . '"><span class="wne-button-title">' . $params['wah_word_spacing_button_title'] . '</span>' . $icon_widget26 . '</button>



											</div>



										</div>',



									);



							/* =================== Widget 10 */



							$icon_widget10                         = icons_enabled() ? '<span class="widget-icon">

							<i class="flaticon-pause-1"></i>



						</span>' : '';



						$wah_default_front_widget['widget-10'] = array(



							'active' => $params['wne_remove_animations_setup'],



							'html'   => '<div class="a_module wne_remove_animations">



								<div class="a_module_exe">



									<button tabindex="-1" data-widgetid="widget-10" type="button" class="wne-action-button wahout wne-call-remove-animations"



									aria-label="' . $params['wne_remove_animations_title'] . '" title="' . $params['wne_remove_animations_title'] . '"><span class="wne-button-title">' . $params['wne_remove_animations_title'] . '</span>' . $icon_widget10 . '</button>



								</div>



							</div>',



						);



						



							



							/* =================== Widget 5 */



						$icon_widget5                         = icons_enabled() ? '<span class="widget-icon">

						<i class="flaticon-link"></i>

						</span>' : '';



								$wah_default_front_widget['widget-5'] = array(



									'active' => $params['underline_links_setup'],



									'html'   => '<div class="a_module wne_underline_links">



										<div class="a_module_exe">



											<button tabindex ="-1" data-widgetid ="widget-5" type="button" class="wne-action-button wahout wne-call-underline-links" aria-label="' . $params['underline_links_setup_title'] . '" title="' . $params['underline_links_setup_title'] . '"><span class="wne-button-title">' . $params['underline_links_setup_title'] . '</span>' . $icon_widget5 . '</button>



										</div>



									</div>',



								);



						



						/* =================== Widget 14 */



						$icon_widget14 = icons_enabled() ? '<span class="widget-icon">

						<i class="flaticon-comment"></i>



					</span>' : '';



							$wah_default_front_widget['widget-14'] = array(



								'active' => $params['wne_image_alt_setup'],



								'html'   => '<div class="a_module wne_image_alt_setup">



									<div class="a_module_exe">



										<button tabindex="-1" data-widgetid="widget-14" type="button" id="wne_image_alt_setup" class="wne-action-button wahout wne-image-alt wne-call-image-alt"



										aria-label="' . $params['wah_image_alt_title'] . '"><span class="wne-button-title">' . $params['wah_image_alt_title'] . '</span>' . $icon_widget14 . '</button>



									</div>



								</div>',



							);



						



						



					/* =================== Widget 21 */	



					$icon_widget21  = icons_enabled() ? '<span class="widget-icon ">

					<i class="flaticon-text-spacing"></i>

					</span>' : '';



					$wah_default_front_widget['widget-21'] = array(



						'active' => $params['wne_enable_letter_spacing_mode'],



						'html'   => '<div class="a_module wne_enable_letter_spacing_mode">



							<div class="a_module_exe">



								<button tabindex="-1" data-widgetid="widget-21" type="button" id="wne_letter_spacing" class="wne-action-button wahout wne-set-letter_spacing"



								aria-label="' . $params['wne_letter_spacing_title'] . '"><span class="wne-button-title">' . $params['wne_letter_spacing_title'] . '</span>' . $icon_widget21 . '</button>



							</div>



						</div>',



					);	



					/* =================== Widget 27 */	



					$icon_widget27                         = icons_enabled() ? '<span class="widget-icon">

					<i class="flaticon-line-height"></i>



				</span>' : '';



						$wah_default_front_widget['widget-27'] = array(



							'active' => $params['wne_enable_line_height'],



							'html'   => '<div class="a_module wne_enable_line_height">



								<div class="a_module_exe">



									<button tabindex="-1" data-widgetid="widget-27" type="button" id="wne_enable_line_height" class="wne-action-button wahout wne-set-line_height"



									aria-label="' . $params['wah_line_height_button_title'] . '"><span class="wne-button-title">' . $params['wah_line_height_button_title'] . '</span>' . $icon_widget27 . '</button>



								</div>



							</div>',



						);



					/* =================== Widget 16 */



					$icon_widget16                         = icons_enabled() ? '<span class="widget-icon">

					<i class="flaticon-cursor"></i>

</span>' : '';



		$wah_default_front_widget['widget-16'] = array(



			'active' => $params['wah_enable_large_mouse_cursor'],



			'html'   => '<div class="a_module wne_large_cursor">



				<div class="a_module_exe">



					<button tabindex="-1" data-widgetid="widget-16" type="button" id="wne_large_cursor" class="wne-action-button wahout wne_large_cursor wne-call-large_cursor"



					aria-label="' . $params['wah_large_mouse_cursor_title'] . '"><span class="wne-button-title">' . $params['wah_large_mouse_cursor_title'] . '</span>' . $icon_widget16 . '</button>



				</div>



			</div>',



		);



		/* =================== Widget 25 */



$icon_widget25                         = icons_enabled() ? '<span class="widget-icon ">

<i class="flaticon-photo"></i>



</span>' : '';



		$wah_default_front_widget['widget-25'] = array(



			'active' => $params['wne_enable_hide_images'],



			'html'   => '<div class="a_module wne_enable_hide_images">



				<div class="a_module_exe">



					<button tabindex="-1" data-widgetid="widget-25" type="button" id="wne_enable_hide_images" class="wne-action-button wahout wne-set-hide-images"



					aria-label="' . $params['wah_hide_image_button_title'] . '"><span class="wne-button-title">' . $params['wah_hide_image_button_title'] . '</span>' . $icon_widget25 . '</button>



				</div>



			</div>',



		);



		



		/* =================== Widget 19 */



		$icon_widget19                         = icons_enabled() ? '<span class="widget-icon">

		<i class="flaticon-rectangles"></i>



</span>' : '';



		$wah_default_front_widget['widget-19'] =  array(



			'active' => $params['wne_toc'],



			'html'   => '<div class="a_module wne_toc">



				<div class="a_module_exe wne_toc_exe">



					<button tabindex="-1" data-widgetid="widget-19" type="button" class="wne-action-button wahout wne-call-toc"



					aria-label="' . $params['wah_inspector_mode_title'] . '"><span class="wne-button-title">' . $params['wah_inspector_mode_title'] . '</span>' . $icon_widget19 . '</button>



				</div>



			</div>',



		);



			/* =================== Widget 24 */



		$icon_widget24                         = icons_enabled() ? '<span class="widget-icon">

		<i class="flaticon-volume-mute"></i>



</span>' : '';



		$wah_default_front_widget['widget-24'] = array(



			'active' => $params['wne_enable_mute'],



			'html'   => '<div class="a_module wne_enable_mute">



				<div class="a_module_exe">



					<button tabindex="-1" data-widgetid="widget-24" type="button" id="wne_enable_mute" class="wne-action-button wahout wne-set-mute"



					aria-label="' . $params['wah_mute_button_title'] . '"><span class="wne-button-title">' . $params['wah_mute_button_title'] . '</span>' . $icon_widget24 . '</button>



				</div>



			</div>',



		);



		



		/* =================== Widget 3 */



		



		$icon_widget3                         = icons_enabled() ? '<span class="goi-icon goi-letter-inside-black"></span>' : '';



		



		$wah_default_front_widget['widget-3'] = array(



			'active' => $params['wne_readable_fonts_setup'],



			'html'   => '<div class="font-setting-customwrap"><div class="font-reset-title-wrap"><div class="wne-widget-section-title"><span class="wne-button-title">' . esc_html__( 'הגדרות גופן', 'wp-nagish-express' ) . '</span></div>'.$params['reset_button'].'</div>',



		);



		$icon_widget1                         = '<span class="wne-button-title">'. __( 'פונט קטן יותר', 'wp-nagish-express' ).'</span>';



			$icon_widget2                         = '<span class="wne-button-title">'. __( 'פונט גדול יותר', 'wp-nagish-express' ).'</span>';



			$smaller_font_size_button             = '<div class="font-resize-col separate_small_font_size"><button tabindex="-1" type="button" class="wne-action-button smaller wahout" title="' . __( 'smaller font size', 'wp-nagish-express' ) . '" aria-label="' . __( 'smaller font size', 'wp-nagish-express' ) . '">' . $icon_widget1 . '<span class="widget-icon">

<i class="flaticon-resize-font"></i>



</span>



</button></div>';



			$larger_font_size_button              = '<div class="font-resize-col separate_small_font_size"><button tabindex="-1" type="button" class="wne-action-button larger wahout" title="' . __( 'larger font size', 'wp-nagish-express' ) . '" aria-label="' . __( 'larger font size', 'wp-nagish-express' ) . '">' . $icon_widget2 . '<span class="widget-icon">

	<i class="flaticon-resize-font-1"></i>

</span>



</button></div>';



$icon_widget3 = '<span class="widget-icon">

<i class="flaticon-font"></i>



</span>';







/* =================== Widget 1 */



			$readable_font_size_button = '<div class="a_module wne_readable_fonts font-resize-col ">



				<div class="a_module_exe readable_fonts"><button tabindex="-1" data-widgetid="widget-3" type="button" class="wne-action-button wahout wne-call-readable-fonts" aria-label="' . $params['wne_readable_fonts_title'] . '" title="' . $params['wne_readable_fonts_title'] . '"><span class="wne-button-title">' . $params['wne_readable_fonts_title'] . '</span>' . $icon_widget3 . '</button></div></div>';



			$wah_default_front_widget['widget-1'] = array(



				'active' => 1,



				'html'   => '<div class="a_module wne_font_resize">



					<div class="a_module_exe font_resizer font-size-settings-inner">' . $readable_font_size_button.$smaller_font_size_button . $larger_font_size_button . '</div>



				</div>',



			);



		} else {



			$icon_widget1                         = icons_enabled() ? '<span class="goi-icon goi-letter-a"></span>' : '';



			$smaller_font_size_button             = '<button tabindex="-1" type="button" class="wne-action-button smaller wahout" title="' . __( 'smaller font size', 'wp-nagish-express' ) . '" aria-label="' . __( 'smaller font size', 'wp-nagish-express' ) . '">' . __( 'פונט קטן יותר', 'wp-nagish-express' ) .''.$icon_widget1 . '</button>';



			$larger_font_size_button              = '<button tabindex="-1" type="button" class="wne-action-button larger wahout" title="' . __( 'larger font size', 'wp-nagish-express' ) . '" aria-label="' . __( 'larger font size', 'wp-nagish-express' ) . '">' .__( 'פונט גדול יותר', 'wp-nagish-express' ).''. $icon_widget1 . '</button>';



			



			



			$wah_default_front_widget['widget-1'] = array(



				'active' => 1,



				'html'   => '<div class="a_module wne_font_resize separate_small_font_size">



					<div class="a_module_exe font_resizer">' . $smaller_font_size_button . '</div>



				</div>' . '<div class="a_module wne_font_resize separate_large_font_size">



					<div class="a_module_exe font_resizer">' . $larger_font_size_button . '</div>



				</div>',



			);



		}



		



		/* =================== Widget 23 */



		$icon_widget23_right                   = icons_enabled() ? '<span class="widget-icon ">

		<i class="flaticon-align-right"></i>



</span>' : '';



		$icon_widget23_center                  = icons_enabled() ? '<span class="widget-icon">

		<i class="flaticon-format"></i>



</span>' : '';



		$icon_widget23_left                    = icons_enabled() ? '<span class="widget-icon">

		<i class="flaticon-align-left"></i>



</span>' : '';



		$wah_default_front_widget['widget-23'] = array(



				'active' => $params['wah_text_alignment'],



				'html'   => '<div class="a_module wne_text_alignment_wrapper font-alignment-settings-inner">



					<div class="a_module_exe">



						<label tabindex="-1" data-widgetid="widget-23" type="button" id="wne_text_alignment_left" class="wne-action-button wne-uniqid wahout set-wne_text_alignment_left"



						aria-label="' . $params['wne_text_alignment_left'] . '" data-wahaction="align-left"><input type="checkbox" name="wne_text_alignment_left"><span class="wne-button-title">' . $params['wne_text_alignment_left'] . '</span>' . $icon_widget23_left . '</label>



					</div>



					<div class="a_module_exe">



						<label tabindex="-1" data-widgetid="widget-23" type="button" id="wne_text_alignment_center" class="wne-action-button wne-uniqid wahout set-wne_text_alignment_center"



						aria-label="' . $params['wne_text_alignment_center'] . '" data-wahaction="align-center"><input type="checkbox" name="wne_text_alignment_center"><span class="wne-button-title">' . $params['wne_text_alignment_center'] . '</span>' . $icon_widget23_center . '</label>



					</div>



					<div class="a_module_exe">



						<label tabindex="-1" data-widgetid="widget-23" type="button" id="wne_text_alignment_right" class="wne-action-button wne-uniqid wahout set-wne_text_alignment_right"



						aria-label="' . $params['wne_text_alignment_right'] . '" data-wahaction="align-right"><input type="checkbox" name="wne_text_alignment_right"><span class="wne-button-title">' . $params['wne_text_alignment_right'] . '</span>' . $icon_widget23_right . '</label>



					</div>



				</div></div>'.$colorSetting,



			);



			



			



			



			/* =================== Widget 9 */



			$icon_widget9                         = icons_enabled() ? '<span class="widget-icon">

			

			<i class="flaticon-contrast"></i>







</span>' : '';



		$wah_default_front_widget['widget-9'] = array(



			'active' => $params['wne_invert_enable'],



			'html'   => '<div class="three_column-invert">



			<label class="three_column-label adjust-title"><span class="wne-button-title">'.__( "Adjust contrast", "wp-nagish-express" ).'</span></label>



			<div class="a_module wne_invert">



				<div class="a_module_exe">



					<button tabindex="-1" data-widgetid="widget-9" type="button" class="wne-action-button wahout wne-call-invert"



					aria-label="' . $params['wne_invert_title'] . '" title="' . $params['wne_invert_title'] . '"><span class="wne-button-title">' . $params['wne_invert_title'] . '</span>' . $icon_widget9 . '</button>



				</div>



			</div>',



		);



			



			



			/* =================== Widget 18 */



			$icon_widget18                         = icons_enabled() ? '<span class="widget-icon">

			<i class="flaticon-contrast-1"></i>





</span>' : '';



		$wah_default_front_widget['widget-18'] = array(



			'active' => $params['wne_enable_sepia_mode'],



			'html'   => '<div class="a_module wne_enable_sepia_mode">



				<div class="a_module_exe">



					<button tabindex="-1" data-widgetid="widget-18" type="button" id="wne_enable_sepia_mode" class="wne-action-button wahout wne_enable_sepia_mode wne-call-sepia_mode"



					aria-label="' . $params['wah_sepia_mode_title'] . '"><span class="wne-button-title">' . $params['wah_sepia_mode_title'] . '</span>' . $icon_widget18 . '</button>



				</div>



			</div>',



		);



			



			/* =================== Widget 17 */



			



			$icon_widget17                         = icons_enabled() ? '<span class="widget-icon ">

			<i class="flaticon-themes"></i>







</span>' : '';



		$wah_default_front_widget['widget-17'] = array(



			'active' => $params['wne_enable_monochrome_mode'],



			'html'   => '<div class="a_module wne_enable_monochrome_mode">



				<div class="a_module_exe">



					<button tabindex="-1" data-widgetid="widget-17" type="button" id="wne_enable_monochrome_mode" class="wne-action-button wahout wne_enable_monochrome_mode wne-call-monochrome_mode"



					aria-label="' . $params['wah_monochrome_mode_title'] . '"><span class="wne-button-title">' . $params['wah_monochrome_mode_title'] . '</span>' . $icon_widget17 . '</button>



				</div>



			</div></div>',



		);



		



		



			



			



			



			



			/* Rest of the widget CODE */



			







		







		







		if ( isset( $params['custom_contrast_variations'] ) && $params['custom_contrast_variations'] ) {



			$wah_default_front_widget['widget-4']         = array(



				'active' => $params['contrast_setup'],



			);



			$wah_default_front_widget['widget-4']['html'] = get_custom_contrast_variations( $params['choose_color_title'] );



		} else {



			$icon_widget4                         = icons_enabled() ? '<span class="goi-icon goi-pipette"></span>' : '';



			$wah_default_front_widget['widget-4'] = array(



				'active' => $params['contrast_setup'],



				'html'   => '<div class="a_module wne_contrast_trigger">



					<div class="a_module_exe contrast_module_exe">



						<button tabindex="-1" data-widgetid="widget-4" type="button" id="contrast_trigger" class="contrast_trigger wne-action-button wahout wne-call-contrast-trigger" title="Contrast">' . $params['choose_color_title'] . $icon_widget4 . '</button>



						<div class="color_selector" >



							<button type="button" class="convar black wahout" data-bgcolor="#000" data-color="#FFF"



							title="' . __( 'black', 'wp-nagish-express' ) . '">' . __( 'black', 'wp-nagish-express' ) . '<span style="color:#FFF !important;">T</span></button>



							<button type="button" class="convar white wahout" data-bgcolor="#FFF" data-color="#000"



							title="' . __( 'white', 'wp-nagish-express' ) . '">' . __( 'white', 'wp-nagish-express' ) . '<span style="color:#000 !important;">T</span></button>



							<button type="button" class="convar green wahout" data-bgcolor="#00FF21" data-color="#000"



							title="' . __( 'green', 'wp-nagish-express' ) . '">' . __( 'green', 'wp-nagish-express' ) . '<span style="color:#000 !important;">T</span></button>



							<button type="button" class="convar blue wahout" data-bgcolor="#0FF" data-color="#000"



							title="' . __( 'blue', 'wp-nagish-express' ) . '">' . __( 'blue', 'wp-nagish-express' ) . '<span style="color:#000 !important;">T</span></button>



							<button type="button" class="convar red wahout" data-bgcolor="#F00" data-color="#000"



							title="' . __( 'red', 'wp-nagish-express' ) . '">' . __( 'red', 'wp-nagish-express' ) . '<span style="color:#000 !important;">T</span></button>



							<button type="button" class="convar orange wahout" data-bgcolor="#FF6A00" data-color="#000" title="' . __( 'orange', 'wp-nagish-express' ) . '">' . __( 'orange', 'wp-nagish-express' ) . '<span style="color:#000 !important;">T</span></button>



							<button type="button" class="convar yellow wahout" data-bgcolor="#FFD800" data-color="#000"



							title="' . __( 'yellow', 'wp-nagish-express' ) . '">' . __( 'yellow', 'wp-nagish-express' ) . '<span style="color:#000 !important;">T</span></button>



							<button type="button" class="convar navi wahout" data-bgcolor="#B200FF" data-color="#000"



							title="' . __( 'navi', 'wp-nagish-express' ) . '">' . __( 'navi', 'wp-nagish-express' ) . '<span style="color:#000 !important;">T</span></button>



						</div>



					</div>



				</div>',



			);



		}







		







		







		







		$icon_widget8                         = icons_enabled() ? '<span class="widget-icon ">

		<i class="flaticon-system"></i>



</span>' : '';



		







		







		







		$icon_widget11                         = icons_enabled() ? '<span class="goi-icon goi-delete"></span>' : '';



		$wah_default_front_widget['widget-11'] = array(



			'active' => $params['remove_styles_setup'],



			'html'   => '<div class="a_module wah_remove_styles">



				<div class="a_module_exe">



					<button tabindex="-1" data-widgetid="widget-11" type="button" class="wne-action-button wahout wah-call-remove-styles"



					aria-label="' . $params['remove_styles_setup_title'] . '" title="' . $params['remove_styles_setup_title'] . '"><span class="wne-button-title">' . $params['remove_styles_setup_title'] . '</span>' . $icon_widget11 . '</button>



				</div>



			</div>',



		);







		$icon_widget12                         = icons_enabled() ? '<div class="cas-icon">



				<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5.718" viewBox="0 0 10 5.718">



				  <path id="Icon_ionic-ios-arrow-down" data-name="Icon ionic-ios-arrow-down" d="M11.189,15.241l3.781-3.784a.712.712,0,0,1,1.009,0,.721.721,0,0,1,0,1.012L11.7,16.756a.713.713,0,0,1-.985.021L6.4,12.472a.715.715,0,0,1,1.009-1.012Z" transform="translate(-6.188 -11.246)" fill="#051e42"/>



				</svg>







			</div>' : '';



		



		$wah_default_front_widget['widget-12'] = array(



			'active' => $params['wne_lights_off_setup'],



			'html'   => '<div class="a_module wne-toggle-cas-module">



				<div class="a_module_exe wne-toggle-cas-exe">



					<button tabindex="-1" data-widgetid="widget-12" type="button" id="wah_lights_off" class="wne-action-button wahout wne-toggle-cas"



					aria-label="' . $params['wne_lights_off_title'] . '">' . $icon_widget12 .'<span class="wne-button-title">' . $params['wne_lights_off_title'] . '</span></button>



				</div>



			</div>',



		);







		$icon_widget13                         = icons_enabled() ? '<span class="goi-icon goi-bulb"></span>' : '';



		$wah_default_front_widget['widget-13'] = array(



			'active' => $params['wah_highlight_titles_setup'],



			'html'   => '<div class="a_module wah_highlight_titles_setup">



				<div class="a_module_exe">



					<button tabindex="-1" data-widgetid="widget-13" type="button" id="wah_highlight_titles_setup" class="wne-action-button wahout wah-highlight-titles wah-call-highlight-titles"



					aria-label="' . $params['wah_highlight_titles_title'] . '"><span class="wne-button-title">' . $params['wah_highlight_titles_title'] . '</span>' . $icon_widget13 . '</button>



				</div>



			</div>',



		);







		







		$wah_default_front_widget['widget-15'] = array(



			'active' => $params['wah_enable_terms_link'],



			'html'   => '<div class="a_module wah_custom_link_setup">



				<div class="a_module_exe">



					<a href="' . $params['wah_custom_link_url'] . '" data-widgetid="widget-15" tabindex="-1" id="wah_custom_link" class="wne-action-button wahout is-wah-link"



					aria-label="' . $params['wah_custom_link_title'] . '"><span class="wne-button-title">' . $params['wah_custom_link_title'] . '</span></a>



				</div>



			</div>',



		);







		



		







		







		







		$icon_widget20                         = icons_enabled() ? '<span class="goi-icon goi-color"></span>' : '';



		$wah_default_front_widget['widget-20'] = array(



			'active' => $params['wah_set_layout_setup'],



			'html'   => '<div class="a_module wah_set_wah_layout">



				<div class="a_module_exe set_wah_layout">



					<button tabindex="-1" data-widgetid="widget-20" type="button" id="wah_set_wah_layout_mode" class="wne-action-button wahout set-wah-layout-popup"



					aria-label="' . $params['wah_set_layout_title'] . '"><span class="wne-button-title">' . $params['wah_set_layout_title'] . '</span>' . $icon_widget20 . '</button>



				</div>



			</div>',



		);







		







		



		$icon_widget23_right                   = icons_enabled() ? '<span class="widget-icon ">

		<i class="flaticon-align-right"></i>



</span>' : '';



		$icon_widget23_center                  = icons_enabled() ? '<span class="widget-icon">

		<i class="flaticon-format"></i>



</span>' : '';



		$icon_widget23_left                    = icons_enabled() ? '<span class="widget-icon"><svg xmlns="http://www.w3.org/2000/svg" width="16.366" height="16.366" viewBox="0 0 16.366 16.366">



  <path id="align_1_" data-name="align (1)" d="M4.72,9.927H15.878a1.492,1.492,0,0,1,1.488,1.488v2.232a1.492,1.492,0,0,1-1.488,1.488H4.72a1.492,1.492,0,0,1-1.488-1.488V11.415A1.492,1.492,0,0,1,4.72,9.927Zm0-6.7h6.7A1.492,1.492,0,0,1,12.9,4.72V6.951a1.492,1.492,0,0,1-1.488,1.488H4.72A1.492,1.492,0,0,1,3.232,6.951V4.72A1.492,1.492,0,0,1,4.72,3.232ZM1.372,1h.744a.351.351,0,0,1,.372.372V16.994a.351.351,0,0,1-.372.372H1.372A.351.351,0,0,1,1,16.994V1.372A.351.351,0,0,1,1.372,1Z" transform="translate(-1 -1)" fill="#051e42"/>



</svg>



</span>' : '';



		if ( 'wah-bottom-fullwidth' !== $params['wah_sidebar_layout'] ) {



			if ( 'magic-sidebar' === $params['wah_sidebar_layout'] ) {



				$icon_widget23_right  = '';



				$icon_widget23_center = '';



				$icon_widget23_left   = '';



			}



			



			



			//echo $colorSetting;



			//echo $colorSetting;



			



		} else {



			$wah_default_front_widget['widget-23'] = array(



				'active' => $params['wah_text_alignment'],



				'html'   => '



					<div class="a_module"><div class="a_module_exe">



						<button tabindex="-1" data-widgetid="widget-23" type="button" id="wne_text_alignment_left" class="wne-action-button wne-uniqid wahout set-wne_text_alignment_left"



						aria-label="' . $params['wne_text_alignment_left'] . '" data-wahaction="align-left"><span class="wne-button-title">' . $params['wne_text_alignment_left'] . '</span>' . $icon_widget23_left . '</button>



					</div></div>



					<div class="a_module"><div class="a_module_exe">



						<button tabindex="-1" data-widgetid="widget-23" type="button" id="wne_text_alignment_center" class="wne-action-button wne-uniqid wahout set-wne_text_alignment_center"



						aria-label="' . $params['wne_text_alignment_center'] . '" data-wahaction="align-center"><span class="wne-button-title">' . $params['wne_text_alignment_center'] . '</span>' . $icon_widget23_center . '</button>



					</div></div>



					<div class="a_module"><div class="a_module_exe">



						<button tabindex="-1" data-widgetid="widget-23" type="button" id="wne_text_alignment_right" class="wne-action-button wne-uniqid wahout set-wne_text_alignment_right"



						aria-label="' . $params['wne_text_alignment_right'] . '" data-wahaction="align-right"><span class="wne-button-title">' . $params['wne_text_alignment_right'] . '</span>' . $icon_widget23_right . '</button>



					</div></div>',



			);



		}



		



		



		



		



		







		







		







		







	return $wah_default_front_widget;



}



/**



 * Get user styles



 *



 * @return string



 */



function wah_get_user_wahstyle() {



	if ( isset( $_COOKIE['user_wahstyle'] ) && $_COOKIE['user_wahstyle'] ) {



		$wah_sidebar_layout = wp_unslash( $_COOKIE['user_wahstyle'] );



	} else {



		$wah_sidebar_layout = 'wide-sidebar';



	}



	return $wah_sidebar_layout;



}



/**



 * WAH get enabled widgets



 *



 * @return array



 */



function wah_calculate_enabled_widgets() {



	$front_widgets     = wah_get_front_widgets_list();



	$enabled_widgets   = array();



	$wah_widgets_order = wah_get_param( 'wne_sidebar_widgets_order' );



	error_reporting( E_ERROR | E_WARNING | E_PARSE );



	if ( $wah_widgets_order ) {



		foreach ( $front_widgets as $id => $value ) {



			if ( isset( $value['active'] ) && $value['active'] && 1 === (int) $value['active'] ) {



				$enabled_widgets[ $id ] = $front_widgets[ $id ];



			}



		}



	} else {



		foreach ( $front_widgets as $id => $value ) {



			if ( isset( $value['active'] ) && $value['active'] && 1 === (int) $value['active'] ) {



				$enabled_widgets[ $id ] = $front_widgets[ $id ];



			}



		}



	}







	return apply_filters( 'wah_enabled_widgets', $enabled_widgets );



}







/**



 * Default contrast options



 *



 * @return array



 */



function wah_default_contrast_options() {



	$contrast_array               = array();



	$contrast_array['contrast-1'] = array(



		'label'   => 'black',



		'bgcolor' => '#000',



		'color'   => '#FFF',



	);



	$contrast_array['contrast-2'] = array(



		'label'   => 'white',



		'bgcolor' => '#FFF',



		'color'   => '#000',



	);



	$contrast_array['contrast-3'] = array(



		'label'   => 'green',



		'bgcolor' => '#00FF21',



		'color'   => '#000',



	);



	$contrast_array['contrast-4'] = array(



		'label'   => 'blue',



		'bgcolor' => '#0FF',



		'color'   => '#000',



	);



	$contrast_array['contrast-5'] = array(



		'label'   => 'red',



		'bgcolor' => '#F00',



		'color'   => '#000',



	);



	$contrast_array['contrast-6'] = array(



		'label'   => 'orange',



		'bgcolor' => '#FF6A00',



		'color'   => '#000',



	);



	$contrast_array['contrast-7'] = array(



		'label'   => 'yellow',



		'bgcolor' => '#FFD800',



		'color'   => '#000',



	);



	$contrast_array['contrast-8'] = array(



		'label'   => 'navi',



		'bgcolor' => '#B200FF',



		'color'   => '#000',



	);







	return $contrast_array;



}







/**



 * Custom contrast variations



 *



 * @param  string $choose_color_title title.



 * @return html



 */



function get_custom_contrast_variations( $choose_color_title ) {



	$wah_adjust_background_colors_title = wah_get_param( 'wah_adjust_background_colors_title' ) ? wah_get_param( 'wah_adjust_background_colors_title' ) : __( 'Adjust Background Colors', 'wp-nagish-express' );







	$contrast_variations  = wah_get_param( 'wne_contrast_variations' );



	$contrast_variations  = unserialize( $contrast_variations );



	$custom_contrast_html = '';



	$icon_widget4         = icons_enabled() ? '<span class="goi-icon goi-pipette"></span>' : '';



	$wah_sidebar_layout   = wah_get_user_wahstyle();







	ob_start();



	if ( $contrast_variations ) {



		$index = 0;



		?>



			<div class="a_module">



				<div class="a_module_exe">



					<?php if ( 'wah-modern' !== $wah_sidebar_layout ) : ?>



						<button type="button" id="contrast_trigger" class="contrast_trigger wne-action-button wahout wne-call-contrast-trigger">



							<?php echo esc_html( $choose_color_title ) . $icon_widget4; ?>



						</button>



					<?php else : ?>



						<label class="wne-action-button wahout wah-contrast-label" tabindex="-1">



							<?php echo '<span class="wne-button-title">' . esc_html( $wah_adjust_background_colors_title ) . '</span>' . $icon_widget4; ?>



						</label>



					<?php endif; ?>



					<div class="color_selector" aria-hidden="true">



						<?php



						foreach ( $contrast_variations as $contrast ) :



							$index++;



							?>



							<button type="button" data-id="convar-<?php echo esc_html( $index ); ?>" class="convar wahout wahcolor" style="background:#<?php echo $contrast['bgcolor']; ?> !important;" data-bgcolor="#<?php echo $contrast['bgcolor']; ?>" data-color="#<?php echo $contrast['textcolor']; ?>" title="<?php echo esc_html( $contrast['title'] ); ?>">



								<?php if ( 'wah-modern' === $wah_sidebar_layout ) : ?>



									<span class="nagishx-active-contrast-property" aria-hidden="true"></span>



								<?php endif; ?>



								<span class="wah-screen-reader-text"><?php echo esc_html( $contrast['title'] ); ?></span>



							</button>



						<?php endforeach; ?>



					</div>



				</div>



			</div>



		<?php



	}



	$custom_contrast_html = ob_get_clean();



	return $custom_contrast_html;







}



/**



 * Limit contrast variations



 *



 * @return integer number



 */



function wah_get_limit_contrast_variations() {



	return 5;



}



/**



 * Render last skiplink



 */



function wah_render_last_skiplink() {



	$close_button_title = wah_get_param( 'wne_close_button_title' ) ? wah_get_param( 'wne_close_button_title' ) : __( 'Close', 'wp-nagish-express' );



	?>



	<button type="button" title="<?php esc_html_e( 'Close sidebar', 'wp-nagish-express' ); ?>" class="wne-skip wne-close-sidebar">



		<?php echo esc_html( $close_button_title ); ?>



	</button>



	<?php



}







/**



 * WNagish Express Accessibility bar



 */



function wah_accessibility_minibar() {



	?>







	<?php do_action( 'wah_access_bar_before' ); ?>







	<div class="wah-access-bar-container">







	<?php do_action( 'wah_access_bar_inner_before' ); ?>







	<div class="wah-access-bar-buttons">



		<button type="button" name="wah-fontsize-toggle">



			<span class="goi-icon goi-font-size-plus"></span>



		</button>



		<button type="button" name="wah-contrast-toggle">



			<span class="goi-icon goi-black-and-white"></span>



		</button>



		<button type="button" name="wah-invert-toggle">



			<span class="goi-icon goi-crossed-out-drop"></span>



		</button>



	</div>







	<?php do_action( 'wah_access_bar_inner_after' ); ?>







	</div>







	<?php do_action( 'wah_access_bar_after' ); ?>







	<?php



}







/**



 * WPML Support



 *



 * @return boolean true/false



 */



function is_wah_wpml() {



	if ( function_exists( 'icl_object_id' ) ) {



		return true;



	}



	return false;



}



/**



 * Check Polylang plugin



 *



 * @return boolean true/false



 */



function is_wah_polylang() {



	if ( function_exists( 'pll_current_language' ) ) {



		return true;



	}



	return false;



}



/**



 * Get wah option



 *



 * @param  string $option option name.



 * @return mixed array/string



 */



function wah_get_param( $option ) {







	$wah_lang                = '';



	$wah_enable_wpml_support = get_option( 'wah_enable_wpml_support' );







	if ( is_wah_wpml() ) {



		if ( $wah_enable_wpml_support ) {



			$wah_lang = '_' . ICL_LANGUAGE_CODE;



		}



	}







	if ( is_wah_polylang() ) {



		$wah_lang = '_' . pll_current_language( 'slug' );



	}







	$param = get_option( $option . $wah_lang );







	return $param;



}



/**



 * WAH set param - update option



 *



 * @param string $option option name.



 * @param mixed  $value  string or array.



 */



function wah_set_param( $option, $value ) {







	$wah_lang                = '';



	$wah_enable_wpml_support = get_option( 'wah_enable_wpml_support' );







	if ( is_wah_wpml() ) {



		if ( $wah_enable_wpml_support ) {



			$wah_lang = '_' . ICL_LANGUAGE_CODE;



		}



	}







	if ( is_wah_polylang() ) {



		$wah_lang = '_' . pll_current_language( 'slug' );



	}







	update_option( $option . $wah_lang, $value );







}



/**



 * Custom buttons params



 *



 * @return array buttons array



 */



function wah_get_custom_button_params() {



	$wah_logo_customizer  = wah_get_param( 'wah_logo_customizer' );



	$custom_button_params = array();







	if ( $wah_logo_customizer ) {



		$custom_button_params = array(



			'wah_logo_bg'    => wah_get_param( 'wah_logo_bg' ),



			'wah_logo_color' => wah_get_param( 'wah_logo_color' ),



			'wah_icon_color' => wah_get_param( 'wah_icon_color' ),



		);



	}



	return $custom_button_params;



}



/**



 * GDPR popup



 */



function wah_render_custom_gdpr_popup_style() {



	$wah_gdpr_custom_bg                  = wah_get_param( 'wah_gdpr_custom_bg' ) ? wah_get_param( 'wah_gdpr_custom_bg' ) : '#000000';



	$wah_gdpr_custom_text_color          = wah_get_param( 'wah_gdpr_custom_text_color' ) ? wah_get_param( 'wah_gdpr_custom_text_color' ) : '#ffffff';



	$wah_gdpr_custom_link_color          = wah_get_param( 'wah_gdpr_custom_link_color' ) ? wah_get_param( 'wah_gdpr_custom_link_color' ) : '#ff8040';



	$wah_gdpr_custom_accept_button_color = wah_get_param( 'wah_gdpr_custom_accept_button_color' ) ? wah_get_param( 'wah_gdpr_custom_accept_button_color' ) : '#ffffff';



	$wah_gdpr_custom_accept_button_bg    = wah_get_param( 'wah_gdpr_custom_accept_button_bg' ) ? wah_get_param( 'wah_gdpr_custom_accept_button_bg' ) : '#008080';



	$wah_gdpr_custom_cancel_button_color = wah_get_param( 'wah_gdpr_custom_cancel_button_color' ) ? wah_get_param( 'wah_gdpr_custom_cancel_button_color' ) : '#ff8040';



	$wah_gdpr_custom_cancel_button_bg    = wah_get_param( 'wah_gdpr_custom_cancel_button_bg' ) ? wah_get_param( 'wah_gdpr_custom_cancel_button_bg' ) : '#ff0000';



	ob_start();



	?>



	<style media="screen">



		#wah-gdpr-popup { background: <?php echo $wah_gdpr_custom_bg; ?>; }



		#wah-gdpr-popup { color: <?php echo $wah_gdpr_custom_text_color; ?>; }



		#wah-gdpr-popup .wah-gdpr-popup-content a { color: <?php echo $wah_gdpr_custom_link_color; ?>; }



		.accept-wah-gdpr-popup { color: <?php echo $wah_gdpr_custom_accept_button_color; ?>; background: <?php echo $wah_gdpr_custom_accept_button_bg; ?>; }



		.close-wah-gdpr-popup { color: <?php echo $wah_gdpr_custom_cancel_button_color; ?>; background: <?php echo $wah_gdpr_custom_cancel_button_bg; ?>; }



	</style>



	<?php



	echo ob_get_clean();



}







/**



 * WAH Ajax hooks



 */



add_action( 'wp_ajax_submit_wah_report_form', 'submit_wah_report_form' );



add_action( 'wp_ajax_nopriv_submit_wah_report_form', 'submit_wah_report_form' );



/**



 * Submit WAH Repport



 */



function submit_wah_report_form() {



	$response = array(



		'error' => true,



		'html'  => __( 'Error', 'wp-nagish-express' ),



	);



	$form     = ( isset( $_POST['form'] ) && $_POST['form'] ) ? $_POST['form'] : array();



	parse_str( $form, $form_args );







	if ( $form_args ) {



		$page_url    = $form_args['wah_report_page_url'];



		$user_email  = $form_args['wah_report_user_email'];



		$subject     = $form_args['wah_report_subject'];



		$description = $form_args['wah_report_description'];



		$date        = gmdate( 'd/m/Y' );



		$mailto      = wah_get_param( 'wah_report_mailto' );







		$headers  = 'From: report@' . isset( $_SERVER['SERVER_NAME'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : '' . "\r\n";



		$headers .= "MIME-Version: 1.0\r\n";



		$headers .= "Content-Type: text/html; charset=UTF-8\r\n";







		$message = '<html><body>';







		$message .= '<h3>Accessibility report information:</h3>';







		$message .= '<p><strong>' . __( 'Page url:', 'wp-nagish-express' ) . '</strong> ' . $page_url . '</p>';



		$message .= '<p><strong>' . __( 'User email:', 'wp-nagish-express' ) . '</strong> ' . $user_email . '</p>';



		$message .= '<p><strong>' . __( 'Subject:', 'wp-nagish-express' ) . '</strong> ' . $subject . '</p>';



		$message .= '<p><strong>' . __( 'Description:', 'wp-nagish-express' ) . '</strong> ' . $description . '</p>';



		$message .= '<p><strong>' . __( 'Log date:', 'wp-nagish-express' ) . '</strong> ' . $date . '</p>';







		$message .= '</body></html>';







		$wp_mail = wp_mail( $mailto, $subject, $message, $headers );







		if ( $wp_mail ) {



			$response['error'] = false;



			$response['html']  = __( 'Thank you, your report has been sent.' );



		}



	}







	wp_send_json( $response );



}







/**



 * Button links



 */



function wah_render_bottom_links() {







	$wah_report_problem_enable = wah_get_param( 'wah_report_problem_enable' );



	$wah_enable_wah_credits    = 1;



	$wah_sidebar_layout        = wah_get_param( 'wah_sidebar_layout' );



	$wah_email        = wah_get_param( 'wah_email' );



	?>



	<?php if ( $wah_report_problem_enable || $wah_enable_wah_credits ) : ?>







		<?php if ( 'magic-sidebar' === $wah_sidebar_layout ) : ?>



			<div class="a_module wne-footer-links-module-wrapper">



		<?php endif; ?>







		<div class="wne-footer-links" data-layout="<?php echo esc_html( $wah_sidebar_layout ); ?>">



			<div class="wne-footer-links-inner">



				<ul>



					<?php



					if ( $wah_report_problem_enable ) :



						$wah_report_problem_title = wah_get_param( 'wah_report_problem_title' );



						?>



						



						<li>



							<button class="wah-popup-trigger wah-report-problem" data-dialogid="wah-report-problem">



								<span class="goi-icon goi-attention-b"></span> <?php echo esc_html( $wah_report_problem_title ); ?>



							</button>



						</li>



					<?php endif; ?>



					<?php  $admin_email = get_option('admin_email'); if ( $wah_enable_wah_credits ) :







						



					?>



						



						<li class="credit_text">



							<?php if(!empty($wah_email)){ ?><a href="mailto:<?php echo $wah_email; ?>" target="_blank">



								<span class="wne-button-title"><?php esc_html_e( 'Report a problem', 'wp-nagish-express' ); ?><span>



							</a>



							<?php }else{ ?>



								<a href="mailto:<?php echo $admin_email; ?>" target="_blank">



								<span class="wne-button-title"><?php esc_html_e( 'Report a problem', 'wp-nagish-express' ); ?><span>



							</a>



							<?php } ?>



						</li>



						<li class="credit_logo">	



							<?php $domainName =  $_SERVER['HTTP_HOST']; ?>



						



							<a target="_blank" href="https://nagishexpress.co.il/?utm_source=<?php echo $domainName; ?>&utm_medium=widget_footer&utm_campaign=nagishexpress_widget"><img src="<?php echo plugin_dir_url( __DIR__ ); ?>assets/images/credit_logo.svg" alt="NagishExpress Logo" /></a>







						</li>



					<?php endif; ?>



				</ul>



			</div>



		</div>







		<?php if ( 'magic-sidebar' === $wah_sidebar_layout ) : ?>



			</div>



		<?php endif; ?>







		<?php



endif;



}



