RTMediaAlbum::register_post_types PHP Méthode

register_post_types() public méthode

Register Custom Post Types required by rtMedia
public register_post_types ( )
    function register_post_types()
    {
        /* Set up Album labels */
        $album_labels = array('name' => esc_html__('Albums', 'buddypress-media'), 'singular_name' => esc_html__('Album', 'buddypress-media'), 'add_new' => esc_html__('Create', 'buddypress-media'), 'add_new_item' => esc_html__('Create Album', 'buddypress-media'), 'edit_item' => esc_html__('Edit Album', 'buddypress-media'), 'new_item' => esc_html__('New Album', 'buddypress-media'), 'all_items' => esc_html__('All Albums', 'buddypress-media'), 'view_item' => esc_html__('View Album', 'buddypress-media'), 'search_items' => esc_html__('Search Albums', 'buddypress-media'), 'not_found' => esc_html__('No album found', 'buddypress-media'), 'not_found_in_trash' => esc_html__('No album found in Trash', 'buddypress-media'), 'parent_item_colon' => esc_html__('Parent', 'buddypress-media'), 'menu_name' => esc_html__('Albums', 'buddypress-media'));
        $album_slug = apply_filters('rtmedia_album_rewrite_slug', 'rtmedia-album');
        $rewrite = array('slug' => $album_slug, 'with_front' => false, 'pages' => true, 'feeds' => false);
        /* Set up Album post type arguments */
        $album_args = array('labels' => $album_labels, 'public' => false, 'publicly_queryable' => false, 'show_ui' => false, 'show_in_menu' => false, 'query_var' => 'rtmedia_album', 'capability_type' => 'post', 'has_archive' => false, 'hierarchical' => true, 'menu_position' => null, 'rewrite' => $rewrite, 'supports' => array('title', 'author', 'thumbnail', 'excerpt', 'comments'));
        $album_args = apply_filters('rtmedia_albums_args', $album_args);
        /* register Album post type */
        register_post_type('rtmedia_album', $album_args);
    }