Enable individual sport mode
This commit is contained in:
@@ -229,6 +229,15 @@ if ( !function_exists( 'sp_nonce' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( !function_exists( 'sp_get_option' ) ) {
|
||||
function sp_get_option( $option, $default = null ) {
|
||||
if ( isset( $_POST[ $option ] ) )
|
||||
return $_POST[ $option ];
|
||||
else
|
||||
return get_option( $option, $default );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !function_exists( 'sp_array_between' ) ) {
|
||||
function sp_array_between ( $array = array(), $delimiter = 0, $index = 0 ) {
|
||||
$keys = array_keys( $array, $delimiter );
|
||||
@@ -2482,25 +2491,19 @@ function sp_get_sport_presets() {
|
||||
function sp_get_text_options() {
|
||||
$strings = apply_filters( 'sportspress_text', array(
|
||||
__( 'Article', 'sportspress' ),
|
||||
__( 'Current Team', 'sportspress' ),
|
||||
__( 'Date', 'sportspress' ),
|
||||
__( 'Details', 'sportspress' ),
|
||||
__( 'Event', 'sportspress' ),
|
||||
__( 'League', 'sportspress' ),
|
||||
__( 'Nationality', 'sportspress' ),
|
||||
__( 'Outcome', 'sportspress' ),
|
||||
__( 'Past Teams', 'sportspress' ),
|
||||
__( 'Played', 'sportspress' ),
|
||||
__( 'Player', 'sportspress' ),
|
||||
__( 'Pos', 'sportspress' ),
|
||||
__( 'Position', 'sportspress' ),
|
||||
__( 'Preview', 'sportspress' ),
|
||||
__( 'Rank', 'sportspress' ),
|
||||
__( 'Recap', 'sportspress' ),
|
||||
__( 'Team Results', 'sportspress' ),
|
||||
__( 'Season', 'sportspress' ),
|
||||
__( 'Staff', 'sportspress' ),
|
||||
__( 'Substitutes', 'sportspress' ),
|
||||
__( 'Team', 'sportspress' ),
|
||||
__( 'Teams', 'sportspress' ),
|
||||
__( 'Time', 'sportspress' ),
|
||||
@@ -2508,9 +2511,21 @@ function sp_get_text_options() {
|
||||
__( 'Total', 'sportspress' ),
|
||||
__( 'Venue', 'sportspress' ),
|
||||
__( 'View all events', 'sportspress' ),
|
||||
__( 'View all players', 'sportspress' ),
|
||||
__( 'View full table', 'sportspress' ),
|
||||
));
|
||||
|
||||
if ( SP()->mode == 'team' ):
|
||||
$strings = array_merge( $strings, array(
|
||||
__( 'Current Team', 'sportspress' ),
|
||||
__( 'Past Teams', 'sportspress' ),
|
||||
__( 'Player', 'sportspress' ),
|
||||
__( 'Position', 'sportspress' ),
|
||||
__( 'Staff', 'sportspress' ),
|
||||
__( 'Substitutes', 'sportspress' ),
|
||||
__( 'View all players', 'sportspress' ),
|
||||
));
|
||||
endif;
|
||||
|
||||
asort( $strings );
|
||||
return $strings;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user