Files
lamine_wp/web/app/themes/la_mine/inc/function.php
T
2020-05-20 15:58:33 +02:00

55 lines
2.0 KiB
PHP

<?php
function wpc_cpt() {
/* Property */
$labels = array(
'name' => _x('Properties', 'Post Type General Name', 'la_mine'),
'singular_name' => _x('Property', 'Post Type Singular Name', 'la_mine'),
'menu_name' => __('Properties', 'la_mine'),
'name_admin_bar' => __('Properties', 'la_mine'),
'parent_item_colon' => __('Parent Item:', 'la_mine'),
'all_items' => __('All Items', 'la_mine'),
'add_new_item' => __('Add New Item', 'la_mine'),
'add_new' => __('Add New', 'la_mine'),
'new_item' => __('New Item', 'la_mine' ),
'edit_item' => __('Edit Item', 'la_mine'),
'update_item' => __('Update Item', 'la_mine'),
'view_item' => __('View Item', 'la_mine'),
'search_items' => __('Search Item', 'la_mine'),
'not_found' => __('Not found', 'la_mine'),
'not_found_in_trash' => __('Not found in Trash', 'la_mine'),
);
$rewrite = array(
'slug' => _x('property', 'property', 'la_mine'),
'with_front' => true,
'pages' => true,
'feeds' => false,
);
$args = array(
'label' => __('property', 'la_mine'),
'description' => __('Properties', 'la_mine'),
'labels' => $labels,
'supports' => array('title', 'editor', 'thumbnail', 'comments', 'revisions', 'custom-fields'),
'taxonomies' => array('property_type'),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-admin-home',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'query_var' => 'property',
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type('property', $args);
}
add_action('init', 'wpc_cpt', 10);
?>