Jake Vanderwerf
5 days ago 266aa37c48222993bf7bdad6834e31bd08736f5e
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
<?php
/**
 * JVB_CONTENT: Base post type definitions
 *     Structure:  slug=> [$options]
 *    Note: slug is prepended with BASE in registration
 * $options includes:
 *      - any $args from register_post_type
 *         - singular and plural labels (string)
 *         - hide_single     = (bool) if true, only show posts on author page
 *         - show_feed     = (bool) if true, becomes one of the content types shown in feed block
 *         - show_directory= (bool) if true, creates an alphabetical list directory page
 *         - karma            = (bool) if true, sets up upvotes/downvotes system
 *         - favouritable     = (bool)
 *         - responses        = (bool) if true, sets up comments and replies
 *         - is_calendar    = (bool) if true, sets up default calendar functionality
 *         - single_image    = (bool) if true, and dashboard is setup, each image becomes its own post
 *         - upload_title    = (string)),
 *      - rewrites      = (array) key = associated taxonomy; value = what to append to rewrite base
 */
$defaults = [];
//if (!empty(JVB_SITE) && array_key_exists('has_support', JVB_SITE) && JVB_SITE['has_support'] === true) {
//  $defaults = array_merge($defaults, jvb_support_post_type());
//}
$content = array_merge($defaults, apply_filters('jvb_content', []));
define('JVB_CONTENT', $content);
 
function jvb_support_post_type():array
{
    return [
        'support'   => [
            'singular'  => 'Support Ticket',
            'plural'    => 'Support Tickets',
            'icon'      => 'question',
            'rewrite'   => [
                'slug'          => 'support',
                'with_front'    => false,
            ],
            'public'    => false,
        ]
    ];
}