From 443c1943e43c3a7fbc0548ab5f0914228b70aa0a Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Mon, 30 Oct 2017 21:13:16 +1100 Subject: [PATCH] Initialize Player of the Match module --- modules/sportspress-player-of-the-match.php | 60 +++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 modules/sportspress-player-of-the-match.php diff --git a/modules/sportspress-player-of-the-match.php b/modules/sportspress-player-of-the-match.php new file mode 100644 index 00000000..86e0a229 --- /dev/null +++ b/modules/sportspress-player-of-the-match.php @@ -0,0 +1,60 @@ +define_constants(); + + add_filter( 'sportspress_text', array( $this, 'add_text_options' ) ); + } + + /** + * Define constants. + */ + private function define_constants() { + if ( !defined( 'SP_PLAYER_OF_THE_MATCH_VERSION' ) ) + define( 'SP_PLAYER_OF_THE_MATCH_VERSION', '2.5' ); + + if ( !defined( 'SP_PLAYER_OF_THE_MATCH_URL' ) ) + define( 'SP_PLAYER_OF_THE_MATCH_URL', plugin_dir_url( __FILE__ ) ); + + if ( !defined( 'SP_PLAYER_OF_THE_MATCH_DIR' ) ) + define( 'SP_PLAYER_OF_THE_MATCH_DIR', plugin_dir_path( __FILE__ ) ); + } + + /** + * Add text options + */ + public function add_text_options( $options = array() ) { + return array_merge( $options, array( + __( 'Player of the Match', 'sportspress' ), + ) ); + } +} + +endif; + +new SportsPress_Player_Of_The_Match();