<?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 (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,
|
]
|
];
|
}
|