Files
wp-gray-dates/templates/admin-page.php
LinRuiqi ba5e5646e6 commit
2025-08-03 10:29:13 +08:00

36 lines
1.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="wrap">
<h1><?php echo esc_html(get_admin_page_title()); ?></h1>
<?php settings_errors('wp_gray_dates_messages'); ?>
<form method="post" action="">
<?php wp_nonce_field('wp_gray_dates_nonce'); ?>
<div class="gray-dates-container">
<h2>设置灰色日期</h2>
<p class="description">在以下日期网站将自动变为灰色。格式MM-DD每年的这一天都会变灰</p>
<div id="gray-dates-list">
<?php if (!empty($gray_dates)): ?>
<?php foreach ($gray_dates as $date): ?>
<div class="gray-date-item">
<input type="text" name="gray_dates[]" value="<?php echo esc_attr($date); ?>" class="datepicker" readonly />
<button type="button" class="button remove-date">删除</button>
</div>
<?php endforeach; ?>
<?php else: ?>
<div class="gray-date-item">
<input type="text" name="gray_dates[]" value="" class="datepicker" readonly />
<button type="button" class="button remove-date">删除</button>
</div>
<?php endif; ?>
</div>
<button type="button" class="button add-date">添加日期</button>
</div>
<p class="submit">
<input type="submit" name="wp_gray_dates_save" class="button-primary" value="保存设置" />
</p>
</form>
</div>