HEX
Server: LiteSpeed
System: Linux cpir1.prohostdns.com 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP Thu May 7 23:17:13 UTC 2026 x86_64
User: pelakir (2976)
PHP: 8.2.31
Disabled: exec, shell_exec, system, passthru, proc_open, proc_close, proc_terminate, proc_get_status, popen, pclose, pcntl_exec
Upload Files
File: //proc/self/cwd/wp-content/themes/woodmart/inc/integrations/visual-composer/fields/image-select.php
<?php if ( ! defined( 'WOODMART_THEME_DIR' ) ) exit( 'No direct script access allowed' );

/**
* Add image select
*/
if( ! function_exists( 'woodmart_add_image_select_type' ) ) {
	function woodmart_add_image_select_type( $settings, $value ) {
		$settings_value = array_flip( $settings['value'] );
		$value = ( ! $value && isset( $settings['std'] ) ) ? $settings['std'] : $value;
		$tooltip = ( isset( $settings['wood_tooltip'] ) ) ? $settings['wood_tooltip'] : false;
		$title = ( isset( $settings['title'] ) ) ? $settings['title'] : true;
		$classes = $tooltip ? 'woodmart-css-tooltip' : '';
		$classes .= ! $tooltip && $title ? ' with-title' : '';

		$data_attrs = isset( $settings['allowed_unselect'] ) ? 'data-allowed-unselect=1' : '';

		$output = '<div class="wd-select-fields wd-style-images"><ul class="wd-select-buttons woodmart-vc-image-select" ' . esc_attr( $data_attrs ) . '>';
			$output .= '<input type="hidden" class="woodmart-vc-image-select-input wpb_vc_param_value" name="' . esc_attr( $settings['param_name'] ) . '" value="' . esc_attr( $value ) . '">';
			foreach ( $settings['value'] as $key => $value ) {
				$output .= '<li data-value="' . esc_attr( $value ) . '" class="' . esc_attr( $classes ) . '" data-text="' . esc_html( $settings_value[$value] ) . '">';
				$output .= '<img src="' . esc_url( $settings['images_value'][$value] ) . '">';
				if ( ! $tooltip && $title ) {
					$output .= '<h4>' . esc_html( $settings_value[$value] ) . '</h4>';
				}
				$output .= '</li>';
			}
		$output .= '</ul></div>';

		return $output;
	}
}