Files
ultimatemember/core/um-taxonomies.php
T

76 lines
2.0 KiB
PHP
Raw Normal View History

2014-12-15 22:38:07 +02:00
<?php
class UM_Taxonomies {
function __construct() {
add_action('init', array(&$this, 'create_taxonomies'), 1);
}
/***
*** @Create taxonomies for use for UM
***/
2015-01-03 23:18:27 +02:00
function create_taxonomies() {
2014-12-15 22:38:07 +02:00
register_post_type( 'um_form', array(
'labels' => array(
'name' => __( 'Forms' ),
'singular_name' => __( 'Form' ),
2014-12-20 18:02:41 +02:00
'add_new' => __( 'Add New' ),
2014-12-15 22:38:07 +02:00
'add_new_item' => __('Add New Form' ),
'edit_item' => __('Edit Form'),
'not_found' => __('You did not create any forms yet'),
'not_found_in_trash' => __('Nothing found in Trash'),
'search_items' => __('Search Forms')
),
'show_ui' => true,
'show_in_menu' => false,
'public' => false,
'supports' => array('title')
)
);
register_post_type( 'um_role', array(
'labels' => array(
2015-01-11 19:07:55 +02:00
'name' => __( 'User Roles' ),
'singular_name' => __( 'User Role' ),
2014-12-20 18:02:41 +02:00
'add_new' => __( 'Add New' ),
2015-01-11 19:07:55 +02:00
'add_new_item' => __('Add New User Role' ),
'edit_item' => __('Edit User Role'),
'not_found' => __('You did not create any user roles yet'),
2014-12-15 22:38:07 +02:00
'not_found_in_trash' => __('Nothing found in Trash'),
2015-01-11 19:07:55 +02:00
'search_items' => __('Search User Roles')
2014-12-15 22:38:07 +02:00
),
'show_ui' => true,
'show_in_menu' => false,
'public' => false,
'supports' => array('title')
)
);
2015-01-14 00:16:44 +02:00
if ( um_get_option('members_page') || !get_option('um_options') ){
2015-01-11 19:07:55 +02:00
2014-12-15 22:38:07 +02:00
register_post_type( 'um_directory', array(
'labels' => array(
2014-12-20 18:02:41 +02:00
'name' => __( 'Member Directories' ),
'singular_name' => __( 'Member Directory' ),
'add_new' => __( 'Add New' ),
'add_new_item' => __('Add New Member Directory' ),
'edit_item' => __('Edit Member Directory'),
2014-12-15 22:38:07 +02:00
'not_found' => __('You did not create any member directories yet'),
'not_found_in_trash' => __('Nothing found in Trash'),
2014-12-20 18:02:41 +02:00
'search_items' => __('Search Member Directories')
2014-12-15 22:38:07 +02:00
),
'show_ui' => true,
'show_in_menu' => false,
'public' => false,
'supports' => array('title')
)
);
2015-01-11 19:07:55 +02:00
}
2014-12-15 22:38:07 +02:00
}
}