__('Music List', 'easel'),
'singular_name' => __('Music', 'easel'),
'add_new' => __('Add New', 'easel'),
'add_new_item' => __('Add New Music', 'easel'),
'edit_item' => __('Edit Music', 'easel'),
'edit' => __('Edit', 'easel'),
'new_item' => __('New Music', 'easel'),
'view_item' => __('View Music', 'easel'),
'search_items' => __('Search Music', 'easel'),
'not_found' => __('No Music found', 'easel'),
'not_found_in_trash' => __('No Music found in Trash', 'easel'),
'view' => __('View Music', 'easel'),
'parent_item_colon' => ''
);
register_post_type(
'music',
array(
'labels' => $labels,
'public' => true,
'public_queryable' => true,
'show_ui' => true,
'query_var' => true,
'capability_type' => 'post',
'rewrite' => true,
'hierarchical' => false,
'supports' => array( 'title', 'editor', 'excerpt', 'custom-fields', 'author', 'trackbacks', 'comments', 'thumbnail' )
));
$labels = array(
'name' => __( 'Group', 'easel' ),
'singular_name' => __( 'Group', 'easel' ),
'search_items' => __( 'Search Groups', 'easel' ),
'popular_items' => __( 'Popular Groups', 'easel' ),
'all_items' => __( 'All Groups', 'easel' ),
'parent_item' => __( 'Parent Group', 'easel' ),
'parent_item_colon' => __( 'Parent Group:', 'easel' ),
'edit_item' => __( 'Edit Group', 'easel' ),
'update_item' => __( 'Update Group', 'easel' ),
'add_new_item' => __( 'Add New Group', 'easel' ),
'new_item_name' => __( 'New Group Name', 'easel' ),
);
register_taxonomy('group',array('music'), array(
'hierarchical' => false,
'public' => true,
'labels' => $labels,
'show_ui' => true,
'query_var' => true,
'show_tagcloud' => true,
'rewrite' => array( 'slug' => 'group' ),
));
register_taxonomy_for_object_type('group', 'music');
}
add_action('init', 'playingnow_init');
add_action('easel-post-info', 'playingnow_display_post_text');
function playingnow_display_post_text() {
global $post;
if ($post->post_type == 'music') {
echo playingnow_display_group();
}
}
add_action('easel-post-foot', 'playingnow_display_edit_link');
function playingnow_display_edit_link() {
global $post;
if ($post->post_type == 'music') {
edit_post_link(__('
Edit this Music.','easel'), '', '');
}
}
function playingnow_display_group() {
global $post;
$before = '