WordPress at Your Fingertips
function is not described

WP_Links_List_Table::prepare_items() public WP 1.0

{} It's a method of the class: WP_Links_List_Table{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Links_List_Table = new WP_Links_List_Table();
$WP_Links_List_Table->prepare_items();

Notes

  • Global. Int. $cat_id
  • Global. String. $s
  • Global. String. $orderby
  • Global. String. $order

Code of WP_Links_List_Table::prepare_items() WP 5.8.2

public function prepare_items() {
	global $cat_id, $s, $orderby, $order;

	wp_reset_vars( array( 'action', 'cat_id', 'link_id', 'orderby', 'order', '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 );
}