__construct()
__construct(string $strPostType, array $arrArgs, string $strCallerPath, string $strTextDomain) : void
Constructs the class object, AdminPageFramework_PostType.
Example
new APF_PostType(
'apf_posts', // post type slug
array( // argument - for the array structure, refer to http://codex.wordpress.org/Function_Reference/register_post_type#Arguments
'labels' => array(
'name' => 'Admin Page Framework',
'singular_name' => 'Admin Page Framework',
'add_new' => 'Add New',
'add_new_item' => 'Add New APF Post',
'edit' => 'Edit',
'edit_item' => 'Edit APF Post',
'new_item' => 'New APF Post',
'view' => 'View',
'view_item' => 'View APF Post',
'search_items' => 'Search APF Post',
'not_found' => 'No APF Post found',
'not_found_in_trash' => 'No APF Post found in Trash',
'parent' => 'Parent APF Post'
),
'public' => true,
'menu_position' => 110,
'supports' => array( 'title' ),
'taxonomies' => array( '' ),
'menu_icon' => null,
'has_archive' => true,
'show_admin_column' => true, // for custom taxonomies
)
);
Parameters
string | $strPostType | The post type slug. |
array | $arrArgs | The argument array passed to register_post_type(). |
string | $strCallerPath | The path of the caller script. This is used to retrieve the script information to insert it into the footer. If not set, the framework tries to detect it. |
string | $strTextDomain | The text domain of the caller script. |