*/
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,
) );
}
function prepare_items() {
global $cat_id, $s, $orderby, $order;
- wp_reset_vars( array( 'action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'orderby', 'order', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]', 's' ) );
+ wp_reset_vars( array( 'action', 'cat_id', 'link_id', 'orderby', 'order', 's' ) );
$args = array( 'hide_invisible' => 0, 'hide_empty' => 0 );
'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
$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':
}
}
}
-
-?>