Class: AC\TableScreen

The AC\TableScreen class contains all information about the WordPress List Table.

The class is located at /admin-columns/classes/TableScreen.php   and can be viewed on github. Please read over the extended comments found above each function to learn more.

Public Methods

get_id() : AC\Type\TableId  

The `TableId` is a hard-coded identifier for each type of list table. There are multiple types of list tables:

The Table ID can be shown on the columns settings page by clicking the menu next to title and then enabling Column Info.


get_labels() : AC\Type\Labels  

Returns the labels  (singular and plural) of the list table. For example Post(s), Page(s), User(s), or Comment(s).

get_labels()->get_plural() : string e.g. "Posts"

get_labels()->get_singular() : string e.g. "Post"


Class: AC/TableScreen/Post

Table ID: post

This class AC/TableScreen/Post extends the AC/TableScreen and inherits its methods and has the following additional public methods:


Public Methods

get_post_type() : PostTypeSlug

Return the post-type e.g. post, page, product or custom_post_type_name  

Example: $post_type = (string)get_post_type()


get_meta_type() : string  

Returns its meta-type (string). e.g. post, user, comment or term  

This method is mostly used when working with custom metadata.

Example: get_metadata( (string)$table->get_meta_type(), 1346, 'custom_key' );  



List Tables

List Table Table ID Class
Posts post AC\TableScreen\Post
Pages page AC\TableScreen\Post
Custom Post Type post_type_name AC\TableScreen\Post
Users wp-users AC\TableScreen\User
Media wp-media AC\TableScreen\Media
Comments wp-comments AC\TableScreen\Comment
Categories wp-taxonomy_category ACP\TableScreen\Taxonomy
Tags wp-taxonomy_post_tag ACP\TableScreen\Taxonomy
Custom Taxonomy wp-taxonomy_taxonomyname ACP\TableScreen\Taxonomy
Network Users wp-ms_users ACP\TableScreen\NetworkUser

Still need help? Contact Us Contact Us