WP_Terms_List_Table::get_columns() WordPress Method

The WP_Terms_List_Table::get_columns() method is used to get the list of columns for the terms list table. The columns are returned as an array of arrays, with each column array containing the following keys: - id: The unique ID for the column. - name: The name of the column. - description: A description of the column. TheWP_Terms_List_Table::get_columns() method is used to get the list of columns for the terms list table. The columns are returned as an array of arrays, with each column array containing the following keys: - id: The unique ID for the column. - name: The name of the column. - description: A description of the column.

WP_Terms_List_Table::get_columns() #


Return

(array)


Top ↑

Source

File: wp-admin/includes/class-wp-terms-list-table.php

	public function get_columns() {
		$columns = array(
			'cb'          => '<input type="checkbox" />',
			'name'        => _x( 'Name', 'term name' ),
			'description' => __( 'Description' ),
			'slug'        => __( 'Slug' ),
		);

		if ( 'link_category' === $this->screen->taxonomy ) {
			$columns['links'] = __( 'Links' );
		} else {
			$columns['posts'] = _x( 'Count', 'Number/count of items' );
		}

		return $columns;
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.