-
Notifications
You must be signed in to change notification settings - Fork 0
/
portfolio-new-custom-post-type.php
73 lines (58 loc) · 2.43 KB
/
portfolio-new-custom-post-type.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* @package portfolio-new-custom-post-type
* @version 1.7.1
*/
/*
Plugin Name: Portfolio new custom post type
Plugin URI: #
Description: This is just a simple plugin
Author: Mario Bondici
Version: 1.0
Author URI: #
*/
/* Copyright YEAR PLUGIN_AUTHOR_NAME (email : your email address)
(Portfolio new post type) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
any later version.
(Portfolio new post type) is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with (Portfolio new post type). If not, see (http://link to your plugin license).
*/
function portfolio_new_custom_post_type() {
$labels = array(
'name' => __( 'Portfolio'),
'singular_name' => __( 'Articolo' ),
'menu_name' => __( 'Portfolio'),
'name_admin_bar' => __( 'Portfolio'),
'add_new' => __( 'Nuovo articolo'),
'add_new_item' => __( 'Aggiungi nuovo articolo'),
'new_item' => __( 'Nuovo articolo'),
'edit_item' => __( 'Modifica articolo'),
'view_item' => __( 'Visualizza articolo'),
'all_items' => __( 'Elenco articoli'),
'search_items' => __( 'Cerca articoli'),
'not_found' => __( 'Nessun articolo trovato'),
'not_found_in_trash' => __( 'Nessun articolo trovato nel cestino')
);
$args = array(
'labels' => $labels,
'public' => true,
'rewrite' => array('slug' => 'portfolio'),
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => 5,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
);
register_post_type( 'portfolio', $args );
}
add_action( 'init', 'portfolio_new_custom_post_type' );
?>