branch for partner partner
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 14 Nov 2016 19:45:33 +0000 (14:45 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 14 Nov 2016 19:45:33 +0000 (14:45 -0500)
functions.php
lib/partner-cpt.php [new file with mode: 0644]

index d4358de..ce2ea52 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 require_once 'lib/menu-walker.php';
 require_once 'lib/navigation.php';
+require_once 'lib/partner-cpt.php';
 require_once 'parts/glm-blocks.php';
 
 $ancestorId   = null;
diff --git a/lib/partner-cpt.php b/lib/partner-cpt.php
new file mode 100644 (file)
index 0000000..eb7a0c5
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+
+// Register Custom Post Type
+function ucgaylord_custom_post_type() {
+
+    $labels = array(
+        'name'                  => _x( 'Partners', 'Post Type General Name', 'ucgaylord' ),
+        'singular_name'         => _x( 'Partner', 'Post Type Singular Name', 'ucgaylord' ),
+        'menu_name'             => __( 'Partner', 'ucgaylord' ),
+        'name_admin_bar'        => __( 'Partner', 'ucgaylord' ),
+        'archives'              => __( 'Partner Archives', 'ucgaylord' ),
+        'parent_item_colon'     => __( 'Parent Partners:', 'ucgaylord' ),
+        'all_items'             => __( 'All Partners', 'ucgaylord' ),
+        'add_new_item'          => __( 'Add New Partner', 'ucgaylord' ),
+        'add_new'               => __( 'Add New', 'ucgaylord' ),
+        'new_item'              => __( 'New Partner', 'ucgaylord' ),
+        'edit_item'             => __( 'Edit Partner', 'ucgaylord' ),
+        'update_item'           => __( 'Update Partner', 'ucgaylord' ),
+        'view_item'             => __( 'View Partner', 'ucgaylord' ),
+        'search_items'          => __( 'Search Partner', 'ucgaylord' ),
+        'not_found'             => __( 'Not found', 'ucgaylord' ),
+        'not_found_in_trash'    => __( 'Not found in Trash', 'ucgaylord' ),
+        'featured_image'        => __( 'Featured Image', 'ucgaylord' ),
+        'set_featured_image'    => __( 'Set featured image', 'ucgaylord' ),
+        'remove_featured_image' => __( 'Remove featured image', 'ucgaylord' ),
+        'use_featured_image'    => __( 'Use as featured image', 'ucgaylord' ),
+        'insert_into_item'      => __( 'Insert into partner', 'ucgaylord' ),
+        'uploaded_to_this_item' => __( 'Uploaded to this parter', 'ucgaylord' ),
+        'items_list'            => __( 'Parnter list', 'ucgaylord' ),
+        'items_list_navigation' => __( 'Partner list navigation', 'ucgaylord' ),
+        'filter_items_list'     => __( 'Filter partner list', 'ucgaylord' ),
+    );
+    $args = array(
+        'label'                 => __( 'Partner', 'ucgaylord' ),
+        'description'           => __( 'Partner Description', 'ucgaylord' ),
+        'labels'                => $labels,
+        'supports'              => array( 'title', 'thumbnail', ),
+        'hierarchical'          => false,
+        'public'                => true,
+        'show_ui'               => true,
+        'show_in_menu'          => true,
+        'menu_position'         => 5,
+        'show_in_admin_bar'     => false,
+        'show_in_nav_menus'     => false,
+        'can_export'            => true,
+        'has_archive'           => false,
+        'exclude_from_search'   => true,
+        'publicly_queryable'    => false,
+        'rewrite'               => false,
+        'capability_type'       => 'page',
+    );
+    register_post_type( 'ucgaylord_partner', $args );
+
+}
+add_action( 'init', 'ucgaylord_custom_post_type', 0 );
+