Add positions to statistics and metrics

This commit is contained in:
Brian Miyaji
2014-01-21 20:35:13 +11:00
parent 08ce1eea27
commit 9cde21de71
33 changed files with 2922 additions and 2685 deletions

View File

@@ -3,7 +3,7 @@ function sportspress_position_term_init() {
$name = __( 'Positions', 'sportspress' );
$singular_name = __( 'Position', 'sportspress' );
$lowercase_name = __( 'position', 'sportspress' );
$object_type = array( 'sp_player', 'attachment' );
$object_type = array( 'sp_player', 'sp_statistic', 'sp_metric', 'attachment' );
$labels = sportspress_get_term_labels( $name, $singular_name, $lowercase_name );
$args = array(
'label' => $name,
@@ -14,6 +14,8 @@ function sportspress_position_term_init() {
);
register_taxonomy( 'sp_position', $object_type, $args );
register_taxonomy_for_object_type( 'sp_position', 'sp_player' );
register_taxonomy_for_object_type( 'sp_position', 'sp_statistic' );
register_taxonomy_for_object_type( 'sp_position', 'sp_metric' );
register_taxonomy_for_object_type( 'sp_position', 'attachment' );
}
add_action( 'init', 'sportspress_position_term_init' );