Load league table and player list option in teams

This commit is contained in:
Brian Miyaji
2016-04-08 15:28:31 +10:00
parent 808ef62fdb
commit ef57de9eab
3 changed files with 34 additions and 12 deletions

View File

@@ -38,6 +38,7 @@ class SportsPress_Player_Lists {
add_filter( 'sportspress_meta_boxes', array( $this, 'add_meta_boxes' ) );
add_filter( 'sportspress_shortcodes', array( $this, 'add_shortcodes' ) );
add_filter( 'sportspress_player_settings', array( $this, 'add_settings' ) );
add_filter( 'sportspress_after_team_template', array( $this, 'add_team_template' ), 20 );
}
/**
@@ -249,6 +250,22 @@ class SportsPress_Player_Lists {
)
) );
}
/**
* Add team template.
*
* @return array
*/
public function add_team_template( $templates ) {
return array_merge( $templates, array(
'lists' => array(
'title' => __( 'Player Lists', 'sportspress' ),
'option' => 'sportspress_team_show_lists',
'action' => 'sportspress_output_team_lists',
'default' => 'yes',
),
) );
}
}
endif;