HEX
Server: nginx/1.26.1
System: Linux iZrj9cbdvwu1cot8sjlyzlZ 5.10.134-15.al8.x86_64 #1 SMP Thu Jul 20 00:44:04 CST 2023 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/dewenlabels.com/wp-content/plugins/woocommerce/templates/order/star-rating.php
<?php
/**
 * Star-rating control partial.
 *
 * Theme-overridable. Copy to `yourtheme/woocommerce/order/star-rating.php`.
 *
 * @see https://woocommerce.com/document/template-structure/
 * @package WooCommerce\Templates
 * @version 10.8.0
 *
 * @var string             $name      Form field name (e.g. `reviews[123][rating]`).
 * @var string             $id_prefix Prefix used for unique radio ids.
 * @var string             $label_id  Existing label id; bound via aria-labelledby.
 * @var int                $selected  Pre-selected value (0 = none).
 * @var array<int, string> $labels    Map of value (1-5) to caption text.
 */

defined( 'ABSPATH' ) || exit;

$caption_id      = $id_prefix . '-caption';
$initial_caption = $selected > 0 && isset( $labels[ $selected ] ) ? $labels[ $selected ] : '';

// Reverse so row-reverse + `~` selectors can fill stars 1..N without `:has()`.
$reversed = array_reverse( $labels, true );
?>
<div
	class="woocommerce-star-rating"
	role="radiogroup"
	aria-labelledby="<?php echo esc_attr( $label_id ); ?>"
	aria-describedby="<?php echo esc_attr( $caption_id ); ?>"
>
	<div class="woocommerce-star-rating__stars">
		<?php foreach ( $reversed as $value => $label ) : ?>
			<?php
			$input_id = $id_prefix . '-' . $value;
			$checked  = $value === $selected;
			?>
			<input
				class="woocommerce-star-rating__input"
				type="radio"
				id="<?php echo esc_attr( $input_id ); ?>"
				name="<?php echo esc_attr( $name ); ?>"
				value="<?php echo esc_attr( (string) $value ); ?>"
				data-label="<?php echo esc_attr( $label ); ?>"
				<?php checked( $checked ); ?>
			/>
			<label class="woocommerce-star-rating__star" for="<?php echo esc_attr( $input_id ); ?>">
				<span class="screen-reader-text">
					<?php
					printf(
						/* translators: 1: numeric star rating 2: label text e.g. "Good" */
						esc_html__( '%1$d out of 5 stars: %2$s', 'woocommerce' ),
						(int) $value,
						esc_html( $label )
					);
					?>
				</span>
				<svg
					class="woocommerce-star-rating__icon"
					width="24"
					height="24"
					viewBox="0 0 24 24"
					aria-hidden="true"
					focusable="false"
				>
					<path d="M12 2.5l2.92 6.36 6.99.74-5.21 4.74 1.46 6.86L12 17.77l-6.16 3.43 1.46-6.86L2.09 9.6l6.99-.74L12 2.5z" />
				</svg>
			</label>
		<?php endforeach; ?>
	</div>

	<span
		id="<?php echo esc_attr( $caption_id ); ?>"
		class="woocommerce-star-rating__caption"
		aria-live="polite"
	><?php echo esc_html( $initial_caption ); ?></span>
</div>