Wordpress 3.5
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-links-list-table.php
index 4776a52f81bcb82c38db24fe23528655317f75cb..b5cbc5560954ab6c42ee094022d02d0fa5db6e4a 100644 (file)
@@ -9,9 +9,10 @@
  */
 class WP_Links_List_Table extends WP_List_Table {
 
-       function __construct() {
+       function __construct( $args = array() ) {
                parent::__construct( array(
                        'plural' => 'bookmarks',
+                       'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
                ) );
        }
 
@@ -68,7 +69,7 @@ class WP_Links_List_Table extends WP_List_Table {
                                'orderby' => 'name',
                        );
                        wp_dropdown_categories( $dropdown_options );
-                       submit_button( __( 'Filter' ), 'secondary', false, false, array( 'id' => 'post-query-submit' ) );
+                       submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
 ?>
                </div>
 <?php
@@ -128,8 +129,12 @@ class WP_Links_List_Table extends WP_List_Table {
                                $attributes = $class . $style;
 
                                switch ( $column_name ) {
-                                       case 'cb':
-                                               echo '<th scope="row" class="check-column"><input type="checkbox" name="linkcheck[]" value="'. esc_attr( $link->link_id ) .'" /></th>';
+                                       case 'cb': ?>
+                                               <th scope="row" class="check-column">
+                                                       <label class="screen-reader-text" for="cb-select-<?php echo $link->link_id; ?>"><?php echo sprintf( __( 'Select %s' ), $link->link_name ); ?></label>
+                                                       <input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" />
+                                               </th>
+                                               <?php
                                                break;
 
                                        case 'name':