Reorganize and add statistics post types
This commit is contained in:
18
admin/terms/div.php
Normal file
18
admin/terms/div.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
function sp_div_term_init() {
|
||||
$name = __( 'Divisions', 'sportspress' );
|
||||
$singular_name = __( 'Division', 'sportspress' );
|
||||
$lowercase_name = __( 'divisions', 'sportspress' );
|
||||
$object_type = array( 'sp_team', 'sp_event', 'sp_player', 'sp_staff' );
|
||||
$labels = sp_tax_labels( $name, $singular_name, $lowercase_name );
|
||||
$args = array(
|
||||
'label' => $name,
|
||||
'labels' => $labels,
|
||||
'public' => true,
|
||||
'hierarchical' => true,
|
||||
'rewrite' => array( 'slug' => 'division' ),
|
||||
);
|
||||
register_taxonomy( 'sp_div', $object_type, $args );
|
||||
}
|
||||
add_action( 'init', 'sp_div_term_init' );
|
||||
?>
|
||||
Reference in New Issue
Block a user