*/
class WP_Links_List_Table extends WP_List_Table {
- function WP_Links_List_Table() {
- parent::WP_List_Table( array(
+ function __construct( $args = array() ) {
+ parent::__construct( array(
'plural' => 'bookmarks',
+ 'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
) );
}
'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
function get_columns() {
return array(
'cb' => '<input type="checkbox" />',
- 'name' => __( 'Name' ),
+ 'name' => _x( 'Name', 'link name' ),
'url' => __( 'URL' ),
'categories' => __( 'Categories' ),
'rel' => __( 'Relationship' ),
$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':
}
}
}
-
-?>