Make WordPress Core


Ignore:
Timestamp:
10/02/2017 04:11:50 AM (7 years ago)
Author:
westonruter
Message:

Customize: Fix WP_Customize_Date_Time_Control to be re-usable for plugins and custom settings.

  • Allow time fields to be omitted by constructing with timeIncluded as false.
  • Ensure reportValidity is only called on a control when it is in an expanded section.
  • Rename "ampm" to "meridian".
  • Improve accessibility and fix HTML validation and style issues for both the date/time control and the preview link control.
  • Fix styling of dropdowns and clean CSS.
  • Improve accessibility of nav menus component.

Props westonruter, afercia, sayedwp, melchoyce.
Amends [41626].
See #39896.
Fixes #42022.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r41353 r41670  
    675675
    676676        $this->manager->add_control( 'new_menu_name', array(
    677             'label'       => '',
     677            'label'       => __( 'New menu name' ),
    678678            'section'     => 'add_menu',
    679679            'type'        => 'text',
     
    681681            'input_attrs' => array(
    682682                'class'       => 'menu-name-field',
    683                 'placeholder' => __( 'New menu name' ),
    684683            ),
    685684        ) );
     
    10181017                    <?php if ( current_user_can( $post_type_obj->cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) ) : ?>
    10191018                        <div class="new-content-item">
    1020                             <input type="text" class="create-item-input" placeholder="<?php echo esc_attr( $post_type_obj->labels->add_new_item ); ?>">
     1019                            <label for="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>" class="screen-reader-text"><?php echo esc_html( $post_type_obj->labels->add_new_item ); ?></label>
     1020                            <input type="text" id="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>" class="create-item-input" placeholder="<?php echo esc_attr( $post_type_obj->labels->add_new_item ); ?>">
    10211021                            <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
    10221022                        </div>
Note: See TracChangeset for help on using the changeset viewer.