Several filters are available to allow customization of a number of displays and features as described in the following paragraphs.
lmao_change_sport_genders– customize the genders names of the Sport object (CPT)lmao_change_sport_levels– customize the level names of the Sport object (CPT)lmao_change_sport_seasons– customize the season names of the Sport object (CPT)
NOTE: These strings are all translation ready using the standard WordPress I18n capabilities. These filters should really not be used for translations.
lmao_change_sport_genders
Out of the box, the default sport genders are “Boys, “Girls”, and “Coed”. However, a college website may want to use “Mens”, “Womens”, and “Coed” on both the front and back ends. The skeleton of the required code is:
add_filter( 'lmao_change_sport_genders', 'my_genders', 10, 1 );
function my_genders( $genders ) {
$genders['boys'} = 'Mens';
$genders['girls'} = 'Womens';
// $genders['coed'] does not change
return $genders;
}
lmao_change_sport_levels
Out of the box, the default sport levels are “Varsity”, “Junior Varsity”, “Soph-Frosh”, and “Frosh”. However, leagues and schools use various levels. For example, suppose the desired levels are “Varsity”, “JV”, and “Freshmen” with no “Soph-Frosh”. The skeleton of the required code is:
add_filter( 'lmao_change_sport_levels', 'my_levels', 10, 1 );
function my_levels( $levels) {
// $levels['varsity'} does not change
$levels['jv'} = 'JV';
$levels['frosh'} = 'Freshman';
unset( $levels['frosh-soph'] ); //Remove "Frosh-Soph"
return $levels;
}
lmao_change_sport_seasons
Out of the box, the default sport seasons are “Fall”, “Winter”, “Spring”, and “Summer”. However, these names can be changed. The skeleton of the required code is:
add_filter( 'lmao_change_sport_seasons', 'my_levels', 10, 1 );
function my_levels( $seasons ) {
$seasons['fall'] = '1st Semester';
$seasons['winter'] = '2nd Semester';
//Remove "Spring" and "Summer"
unset( $seasons['spring'] );
unset( $seasons['summer'] );
return $seasons;
}