PluginProbe
WP Ultimate Post Grid / 1.9
WP Ultimate Post Grid v1.9
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / helpers / post_type.php

post_type.php in WP Ultimate Post Grid 1.9, at helpers/post_type.php

46 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class WPUPG_Post_Type {
4
5 public function __construct()
6 {
7 add_action( 'init', array( $this, 'register_post_type' ), 1);
8 }
9
10 public function register_post_type()
11 {
12 $name = __( 'Grids', 'wp-ultimate-post-grid' );
13 $singular = __( 'Grid', 'wp-ultimate-post-grid' );
14
15 $args = apply_filters( 'wpupg_register_post_type',
16 array(
17 'labels' => array(
18 'name' => $name,
19 'singular_name' => $singular,
20 'add_new' => __( 'Add New', 'wp-ultimate-post-grid' ),
21 'add_new_item' => __( 'Add New', 'wp-ultimate-post-grid' ) . ' ' . $singular,
22 'edit' => __( 'Edit', 'wp-ultimate-post-grid' ),
23 'edit_item' => __( 'Edit', 'wp-ultimate-post-grid' ) . ' ' . $singular,
24 'new_item' => __( 'New', 'wp-ultimate-post-grid' ) . ' ' . $singular,
25 'view' => __( 'View', 'wp-ultimate-post-grid' ),
26 'view_item' => __( 'View', 'wp-ultimate-post-grid' ) . ' ' . $singular,
27 'search_items' => __( 'Search', 'wp-ultimate-post-grid' ) . ' ' . $name,
28 'not_found' => __( 'No', 'wp-ultimate-post-grid' ) . ' ' . $name . ' ' . __( 'found.', 'wp-ultimate-post-grid' ),
29 'not_found_in_trash' => __( 'No', 'wp-ultimate-post-grid' ) . ' ' . $name . ' ' . __( 'found in trash.', 'wp-ultimate-post-grid' ),
30 'parent' => __( 'Parent', 'wp-ultimate-post-grid' ) . ' ' . $singular,
31 ),
32 'public' => true,
33 'exclude_from_search' => true,
34 'show_ui' => true,
35 'menu_position' => 20,
36 'supports' => array( 'title' ),
37 'taxonomies' => array(),
38 'menu_icon' => 'dashicons-grid-view', //WPUltimatePostGrid::get()->coreUrl . '/img/icon_16.png',
39 'has_archive' => false,
40 'rewrite' => false,
41 )
42 );
43
44 register_post_type( WPUPG_POST_TYPE, $args );
45 }
46 }