Make easier and faster to translate Countdown test

This commit is contained in:
savvasha
2019-08-12 12:30:47 +03:00
parent 970bc812d9
commit a38facdeb2

View File

@@ -34,6 +34,7 @@ class SportsPress_Countdowns {
// Filters // Filters
add_filter( 'sportspress_shortcodes', array( $this, 'add_shortcodes' ) ); add_filter( 'sportspress_shortcodes', array( $this, 'add_shortcodes' ) );
add_filter( 'sportspress_event_settings', array( $this, 'add_settings' ) ); add_filter( 'sportspress_event_settings', array( $this, 'add_settings' ) );
add_filter( 'sportspress_text', array( $this, 'add_text_options' ) );
} }
/** /**
@@ -104,6 +105,18 @@ class SportsPress_Countdowns {
); );
return $settings; return $settings;
} }
/**
* Add text options
*/
public function add_text_options( $options = array() ) {
return array_merge( $options, array(
__( 'days', 'sportspress' ),
__( 'hrs', 'sportspress' ),
__( 'mins', 'sportspress' ),
__( 'secs', 'sportspress' ),
) );
}
} }
endif; endif;