Heray-Was-Here
Server : Apache
System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User : daemon ( 1)
PHP Version : 8.1.10
Disable Function : NONE
Directory :  /bitnami/wordpress/wp-content/plugins/testify/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /bitnami/wordpress/wp-content/plugins/testify/includes/widget-form.php
<?php
/**
 * This file includes code based on and/or copied from WordPress
 * See license.txt for copyright and licensing details
 *
 * This file modified by Jonathan Hall, Dominika Rauk and/or others; last modified 2020-08-28
 *
 */
?>

<div class="testify-widget-settings testify-settings">

	<p>
        <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Title:', 'testify-testify'); ?></label>
	    <input class="widefat" id="<?php echo esc_html($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php if (!empty($instance['title'])) echo esc_html($instance['title']); ?>" />
    </p>


	<div class="testify-tax-field">

		<label><?php esc_html_e('Testimonial Categories', 'testify-testify'); ?>:</label>

		<ul>
			<?php
				ob_start();

				wp_terms_checklist(0, array(
					'taxonomy' => 'testify-cat',
					'selected_cats' => (empty($instance['category']) ? array() : $instance['category'])
				));

				$checklist = ob_get_contents();

				ob_end_clean();
				
				// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $checklist is HTML generated by the function above, and the replace value is escaped
				echo(str_replace('tax_input[testify-cat]', esc_attr( $this->get_field_name('category') ), $checklist));
			?>
		</ul>
	</div>

	<div class="testify-tax-field">

		<label><?php esc_html_e('Testimonial Tags', 'testify-testify'); ?>:</label>

		<ul>
			<?php
				ob_start();

				wp_terms_checklist(0, array(
					'taxonomy' => 'testify-tag',
					'selected_cats' => (empty($instance['tag']) ? array() : $instance['tag'])
				));

				$checklist = ob_get_contents();

				ob_end_clean();
				
				// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $checklist is HTML generated by the function above, and the replace value is escaped
				echo(str_replace('tax_input[testify-tag]', esc_attr( $this->get_field_name('tag') ), $checklist));
			?>
		</ul>
	</div>

	<label><?php esc_html_e('Display', 'testify-testify'); ?>:</label>
	
	<div class="testify-settings-panels testify-accordion-panels">
	<?php foreach ($testifyOptions as $categoryId => $category) { ?>

		<h4><?php echo(esc_html($category['name'])); ?></h4>

		<div class="testify-settings-panel" data-testify-panel-id="<?php echo esc_html($categoryId); ?>">

			<?php foreach ($category['settings'] as $settingId => $setting) {

				if ($setting['type'] == 'color') { ?>

					<div class="testify-setting-color">
						<div>
                            <?php echo(esc_html($setting['name'])); ?>
							<?php if (isset($setting['desc'])) echo('<small>'.esc_html($setting['desc']).'</small>'); ?>
                        </div>
						<div>
							<input type="text" name="<?php echo esc_html($this->get_field_name($settingId)); ?>" value="<?php echo(esc_html($instance[$settingId])); ?>" class="testify-widget-color-control" data-palette="true" data-show-opacity="true" data-default-color="<?php echo(esc_attr($testifyOptionsCurrent[$settingId])); ?>" />
						</div>
					</div>

				<?php } else { ?>

					<label class="testify-setting-<?php echo esc_html($setting['type']); ?>">
						<span>
                            <?php echo(esc_html($setting['name'])); ?>
							<?php if (isset($setting['desc'])) echo('<small>'.esc_html($setting['desc']).'</small>'); ?>
                        </span>

						<span>
							<?php
								switch ($setting['type']) {
									case 'select': ?>

										<select name="<?php echo esc_html($this->get_field_name($settingId)); ?>">
                                            <?php
                                            foreach ($setting['options'] as $optionId => $option) {
                                                echo('<option value="'.esc_attr($optionId).'"'.($optionId == $instance[$settingId] ? ' selected="selected"' : '').'>'.esc_html($option).'</option>');
                                            }
                                            ?>
										</select>

									<?php break;
									case 'integer': ?>

										<input type="number" name="<?php echo esc_attr($this->get_field_name($settingId)); ?>" value="<?php echo(esc_attr($instance[$settingId])); ?>" min="0" />

									<?php break;
									case 'decimal': ?>

										<input type="number" name="<?php echo esc_attr($this->get_field_name($settingId)); ?>" value="<?php echo(esc_attr($instance[$settingId])); ?>" min="0" step="0.01" />

									<?php break;
									case 'checkbox': ?>

										<input type="checkbox" name="<?php echo esc_attr($this->get_field_name($settingId)); ?>"<?php if ($instance[$settingId]) echo(' checked="checked"'); ?> />

									<?php break;
									case 'qmark': ?>

										<input type="hidden" name="<?php echo esc_attr($this->get_field_name($settingId)); ?>" value="<?php echo(esc_attr($instance[$settingId])); ?>" />

										<?php // Adapted from testify/includes/testify_qmark_customize_control.php

										echo('<span class="testify-qmark-option'.(empty($instance[$settingId]) ? ' active' : '').'" onclick="jQuery(this).addClass(\'active\').siblings().removeClass(\'active\').siblings(\'input\').val(0).change();">'.esc_html__('None', 'testify-testify').'</span>');

										$qmarkId = 1;
										$qmarkFilePre = dirname(__FILE__).'/../img/qmark';

										while( file_exists($qmarkFilePre.$qmarkId.'.svg') && ( $qmarkSvg = file_get_contents($qmarkFilePre.$qmarkId.'.svg') ) ) {
											echo('<span class="testify-qmark-option'.($instance[$settingId] == $qmarkId ? ' active' : '').'" onclick="jQuery(this).addClass(\'active\').siblings().removeClass(\'active\').siblings(\'input\').val('.((int) $qmarkId).').change();">'
												// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- SVG code from a file that comes with this plugin
												.str_replace('{color}', '#666', $qmarkSvg).'</span>');
											++$qmarkId;
										}

										break;
									case 'icon':
										// Adapted from includes/testify_icon_customize_control.php and includes/shortcode-dialog.php
									?>
										<input type="hidden" name="<?php echo esc_attr($this->get_field_name($settingId)); ?>" value="<?php echo(esc_attr($instance[$settingId])); ?>" class="testify_readmore_input" />
									<?php
										// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fixed HTML with one insertion that is from a function that produces escaped HTML
										printf( '<ul class="testify_font_icon">%1$s</ul>', testify_get_font_icon_list_items($instance[$settingId]) );
										break;

									default: ?>
										<input type="text" name="<?php echo esc_attr($this->get_field_name($settingId)); ?>" value="<?php echo(esc_attr($instance[$settingId])); ?>" />
									<?php
								}
							?>
						</span>
					</label>

				<?php } ?>
			<?php } ?>

		</div>
	<?php } ?>
	</div>
</div>

Hry