Make WordPress Core


Ignore:
Timestamp:
09/24/2015 01:06:17 AM (9 years ago)
Author:
wonderboymusic
Message:

List Tables: add JS code to dynamically toggle the disabled attribute of the Bulk Actions dropdown and Apply button.

Props wonderboymusic, pareshradadiya.
Fixes #31634.

File:
1 edited

Legend:

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

    r34383 r34467  
    438438            return;
    439439
    440         echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
    441         echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
    442         echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
     440        echo '<label for="bulk-action-selector-' . esc_attr( $which ) . '" class="screen-reader-text">' . __( 'Select bulk action' ) . '</label>';
     441        echo '<select name="action' . $two . '" id="bulk-action-selector-' . esc_attr( $which ) . "\">\n";
     442        echo '<option value="-1">' . __( 'Bulk Actions' ) . "</option>\n";
    443443
    444444        foreach ( $this->_actions as $name => $title ) {
    445445            $class = 'edit' === $name ? ' class="hide-if-no-js"' : '';
    446446
    447             echo "\t<option value='$name'$class>$title</option>\n";
     447            echo "\t" . '<option value="' . $name . '"' . $class . '>' . $title . "</option>\n";
    448448        }
    449449
Note: See TracChangeset for help on using the changeset viewer.