The CPAC_Storage_Model object contains all available columns, storage methods, and meta type information.

The storage model is available from the CPAC_Column object by using the get_storage_model() method.

Storage Models

Currently there are 6 different storage models for each meta type: User, Post, Taxonomy, Media, User and Comment.

  • CPAC_Storage_Model_Post
  • CPAC_Storage_Model_Media
  • CPAC_Storage_Model_User
  • CPAC_Storage_Model_Comment
  • CPAC_Storage_Model_Taxonomy

Usefull Methods

Note: some methods are only available since verion 3.4.1

  • get_type() : Returns the type of the column; eg ‘user’, ‘post’, ‘media’, ‘comment’.
  • get_meta_type() : Returns the meta type, eg ‘user’, ‘post’, ‘comment’. It tells which WordPress object the storage_model is for. The difference with get_type is the Media storage type, which is a ‘post’ meta_type.

Type specific methods

  • get_post_type() : Returns the post_type of the column ( only applies to CPAC_Storage_Model_Post )
  • get_taxonomy() : Returns the taxonomy of the column ( only applies to CPAC_Storage_Model_Taxonomy )