Make WordPress Core


Ignore:
Timestamp:
07/25/2012 04:18:14 PM (13 years ago)
Author:
ryan
Message:

More screen reader text for list table checkboxes and theme install search. Props MikeLittle, SergeyBiryukov. see #21325

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-plugins-list-table.php

    r21198 r21323  
    372372        $class = $is_active ? 'active' : 'inactive';
    373373        $checkbox_id =  "checkbox_" . md5($plugin_data['Name']);
    374         $checkbox = in_array( $status, array( 'mustuse', 'dropins' ) ) ? '' : "<input type='checkbox' name='checked[]' value='" . esc_attr( $plugin_file ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $plugin_data['Name'] . "</label>";
     374        if ( in_array( $status, array( 'mustuse', 'dropins' ) ) ) {
     375            $checkbox = '';
     376        } else {
     377            $checkbox = "<label class='screen-reader-text' for='" . $checkbox_id . "' >" . sprintf( __( 'Select %s' ), $plugin_data['Name'] ) . "</label>"
     378                . "<input type='checkbox' name='checked[]' value='" . esc_attr( $plugin_file ) . "' id='" . $checkbox_id . "' />";
     379        }
    375380        if ( 'dropins' != $context ) {
    376381            $description = '<p>' . ( $plugin_data['Description'] ? $plugin_data['Description'] : '&nbsp;' ) . '</p>';
Note: See TracChangeset for help on using the changeset viewer.