Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit 74533b7

Browse files
committed
Add labels for snapshot title and scheduling; remove redundant text
1 parent 52886ca commit 74533b7

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

php/class-customize-snapshot-manager.php

+8-10
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ public function remove_all_non_snapshot_admin_bar_links( $wp_admin_bar ) {
14061406
public function render_templates() {
14071407
$data = $this->get_month_choices();
14081408

1409-
$description = __( 'Schedule your changes to publish (go live) at a future date.', 'customize-snapshots' );
1409+
$description = __( 'Schedule changes to publish (go live) at a future date.', 'customize-snapshots' );
14101410
?>
14111411
<script type="text/html" id="tmpl-snapshot-preview-link">
14121412
<a href="#" target="frontend-preview" id="snapshot-preview-link" class="dashicons dashicons-welcome-view-site" title="<?php esc_attr_e( 'View on frontend', 'customize-snapshots' ) ?>">
@@ -1430,17 +1430,17 @@ public function render_templates() {
14301430

14311431
<ul class="snapshot-controls">
14321432
<li class="snapshot-control">
1433-
<span class="customize-control-title snapshot-control-title">
1434-
<?php esc_html_e( 'Snapshot Title', 'customize-snapshots' ); ?>
1435-
</span>
1433+
<label for="snapshot-title" class="customize-control-title snapshot-control-title">
1434+
<?php esc_html_e( 'Title', 'customize-snapshots' ); ?>
1435+
</label>
14361436
<input id="snapshot-title" type="text" value="{{data.title}}">
14371437
</li>
14381438
<# if ( data.currentUserCanPublish ) { #>
14391439
<li class="snapshot-control">
1440-
<span class="customize-control-title snapshot-control-title">
1441-
<?php esc_html_e( 'Snapshot Scheduling', 'customize-snapshots' ); ?>
1440+
<label for="snapshot-date-month" class="customize-control-title snapshot-control-title">
1441+
<?php esc_html_e( 'Scheduling', 'customize-snapshots' ); ?>
14421442
<span class="reset-time">(<a href="#" title="<?php esc_attr_e( 'Reset scheduled date to original or current date', 'customize-snapshots' ); ?>"><?php esc_html_e( 'Reset', 'customize-snapshots' ) ?></a>)</span>
1443-
</span>
1443+
</label>
14441444
<p class="snapshot-schedule-description">
14451445
<?php echo esc_html( $description ); ?>
14461446
</p>
@@ -1449,10 +1449,8 @@ public function render_templates() {
14491449
<span class="screen-reader-text"><?php esc_html_e( 'Month', 'customize-snapshots' ); ?></span>
14501450
<#
14511451
_.defaults( data, <?php echo wp_json_encode( $data ) ?> );
1452-
data.input_id_post_date = 'input-' + String( Math.random() );
1453-
data.input_id_post_date_gmt = 'input-' + String( Math.random() );
14541452
#>
1455-
<select id="{{ data.input_id }}" class="date-input month" data-date-input="month">
1453+
<select id="snapshot-date-month" class="date-input month" data-date-input="month">
14561454
<# _.each( data.month_choices, function( choice ) { #>
14571455
<# if ( _.isObject( choice ) && ! _.isUndefined( choice.text ) && ! _.isUndefined( choice.value ) ) {
14581456
text = choice.text;

0 commit comments

Comments
 (0)