SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php | |
| 2 | add_action( 'init', 'info_advert_init' ); | |
| 3 | ||
| 4 | /* Here we create our Advertisment Custom Post Types */ | |
| 5 | function info_advert_init() {
| |
| 6 | ||
| 7 | $labels = array( | |
| 8 | 'name' => _x( 'Content Advertisment', 'Content Advertisments' ), | |
| 9 | 'singular_name' => _x( 'Content Advertisment', 'Content Advertisment' ), | |
| 10 | 'add_new' => _x( 'Add New', 'advert' ), | |
| 11 | 'add_new_item' => __( 'Add New Advertisment' ), | |
| 12 | 'edit_item' => __( 'Edit Advertisment' ), | |
| 13 | 'new_item' => __( 'New Advertisment' ), | |
| 14 | 'view_item' => __( 'View Advertisment' ), | |
| 15 | 'search_items' => __( 'Search Advertisments' ), | |
| 16 | 'not_found' => __( 'No Advertisment found' ), | |
| 17 | 'not_found_in_trash' => __( 'No Advertisments found in Trash' ), | |
| 18 | - | 'parent_item_colon' => '', |
| 18 | + | 'parent_item_colon' => '' |
| 19 | - | 'show_in_nav_menus' => false |
| 19 | + | |
| 20 | ||
| 21 | $args = array( 'labels' => $labels, | |
| 22 | 'public' => true, | |
| 23 | 'publicly_queryable' => true, | |
| 24 | 'show_ui' => true, | |
| 25 | 'query_var' => true, | |
| 26 | 'rewrite' => true, | |
| 27 | 'capability_type' => 'post', | |
| 28 | 'hierarchical' => false, | |
| 29 | 'menu_position' => null, | |
| 30 | 'show_in_nav_menus' => false, | |
| 31 | 'supports' => array( 'title', 'editor') | |
| 32 | ); | |
| 33 | ||
| 34 | register_post_type( 'advert', $args ); | |
| 35 | } |