wppaste
WordPress

WP_Links_List_Table

Since
3.1.0
Source
wp-admin/includes/class-wp-links-list-table.php:17
Core class used to implement displaying links in a list table.

Compatibility

WordPress
since 3.1.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 1

Every hook that fires from inside WP_Links_List_Table, in the order it appears in the class, grouped by the method that fires it.

Methods · 19

Source code

class WP_Links_List_Table extends WP_List_Table { 	/**	 * Constructor.	 *	 * @since 3.1.0	 *	 * @see WP_List_Table::__construct() for more information on default arguments.	 *	 * @param array $args An associative array of arguments.	 */	public function __construct( $args = array() ) {		parent::__construct(			array(				'plural' => 'bookmarks',				'screen' => isset( $args['screen'] ) ? $args['screen'] : null,			)		);	} 	/**	 * @return bool	 */	public function ajax_user_can() {		return current_user_can( 'manage_links' );	} 	/**	 * @global int    $cat_id	 * @global string $s	 * @global string $orderby	 * @global string $order	 */	public function prepare_items() {		global $cat_id, $s, $orderby, $order; 		$cat_id  = ! empty( $_REQUEST['cat_id'] ) ? absint( $_REQUEST['cat_id'] ) : 0;		$orderby = ! empty( $_REQUEST['orderby'] ) ? sanitize_text_field( $_REQUEST['orderby'] ) : '';		$order   = ! empty( $_REQUEST['order'] ) ? sanitize_text_field( $_REQUEST['order'] ) : '';		$s       = ! empty( $_REQUEST['s'] ) ? sanitize_text_field( $_REQUEST['s'] ) : ''; 		$args = array(			'hide_invisible' => 0,			'hide_empty'     => 0,		); 		if ( 'all' !== $cat_id ) {			$args['category'] = $cat_id;		}		if ( ! empty( $s ) ) {			$args['search'] = $s;		}		if ( ! empty( $orderby ) ) {			$args['orderby'] = $orderby;		}		if ( ! empty( $order ) ) {			$args['order'] = $order;		} 		$this->items = get_bookmarks( $args );	} 	/**	 */	public function no_items() {		_e( 'No links found.' );	} 	/**	 * @return array	 */	protected function get_bulk_actions() {		$actions           = array();		$actions['delete'] = __( 'Delete' ); 		return $actions;	} 	/**	 * @global int $cat_id

Changelog

Introduced in 3.1.0. One change between 6.7.7 and 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

7.1.0
Method get_primary_column_aria_label() added.verified against source
3.1.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-admin/includes/class-wp-links-list-table.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.