/**
 * Register person post type
 *
 * @since 0.9
 */
function ctc_register_post_type_person()
{
    // Arguments
    $args = array('labels' => array('name' => _x('People', 'post type general name', 'church-theme-content'), 'singular_name' => _x('Person', 'post type singular name', 'church-theme-content'), 'add_new' => _x('Add New', 'person', 'church-theme-content'), 'add_new_item' => __('Add Person', 'church-theme-content'), 'edit_item' => __('Edit Person', 'church-theme-content'), 'new_item' => __('New Person', 'church-theme-content'), 'all_items' => __('All People', 'church-theme-content'), 'view_item' => __('View Person', 'church-theme-content'), 'search_items' => __('Search People', 'church-theme-content'), 'not_found' => __('No people found', 'church-theme-content'), 'not_found_in_trash' => __('No people found in Trash', 'church-theme-content')), 'public' => ctc_feature_supported('people'), 'has_archive' => ctc_feature_supported('people'), 'rewrite' => array('slug' => 'people', 'with_front' => false, 'feeds' => ctc_feature_supported('people')), 'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'excerpt'), 'taxonomies' => array('ctc_person_group'), 'menu_icon' => 'dashicons-admin-users');
    $args = apply_filters('ctc_post_type_person_args', $args);
    // allow filtering
    // Registration
    register_post_type('ctc_person', $args);
}
Beispiel #2
0
/**
 * Add mime types for media upload
 *
 * The sermon feature supports audio, video and PDF. Make sure these files can be uploaded.
 * The audio and video types below are supported by the MediaElement.js core WordPress player.
 *
 * See wp_get_mime_types() for available mime types.
 *
 * @since 0.9
 * @param array $mime_types Currently uploadable mime types
 * @return array Mime types with additions
 */
function ctc_add_mime_types($mime_types)
{
    // Sermon feature supported?
    if (ctc_feature_supported('sermons')) {
        // Video
        $mime_types['webm'] = 'video/webm';
        $mime_types['ogv'] = 'video/ogg';
        $mime_types['mp4|m4v'] = 'video/mp4';
        $mime_types['wmv'] = 'video/x-ms-wmv';
        $mime_types['mov|qt'] = 'video/quicktime';
        $mime_types['flv'] = 'video/x-flv';
        // Audio
        $mime_types['mp3|m4a|m4b'] = 'audio/mpeg';
        $mime_types['ogg|oga'] = 'audio/ogg';
        $mime_types['wma'] = 'audio/x-ms-wma';
        $mime_types['wav'] = 'audio/wav';
        // PDF
        $mime_types['pdf'] = 'application/pdf';
    }
    return $mime_types;
}