From eccd77bcb10d2914b061d72834ef439f61a4c84c Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 10 Jun 2016 11:57:06 +1000 Subject: [PATCH] Add text options for age and birthday --- modules/sportspress-birthdays.php | 17 ++++++++++++++--- readme.txt | 1 + wpml-config.xml | 2 ++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/modules/sportspress-birthdays.php b/modules/sportspress-birthdays.php index 524faa58..525b9e52 100644 --- a/modules/sportspress-birthdays.php +++ b/modules/sportspress-birthdays.php @@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/ Description: Add birthdays to players and staff. Author: ThemeBoy Author URI: http://themeboy.com/ -Version: 1.9.19 +Version: 2.0.8 */ // Exit if accessed directly @@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_Birthdays' ) ) : * Main SportsPress Birthdays Class * * @class SportsPress_Birthdays - * @version 1.9.19 + * @version 2.0.8 */ class SportsPress_Birthdays { @@ -29,6 +29,7 @@ class SportsPress_Birthdays { $this->define_constants(); add_filter( 'gettext', array( $this, 'gettext' ), 20, 3 ); + add_filter( 'sportspress_text', array( $this, 'add_text_options' ) ); add_filter( 'sportspress_player_options', array( $this, 'add_player_options' ) ); add_filter( 'sportspress_staff_options', array( $this, 'add_staff_options' ) ); add_filter( 'sportspress_player_details', array( $this, 'add_player_details' ), 20, 2 ); @@ -42,7 +43,7 @@ class SportsPress_Birthdays { */ private function define_constants() { if ( !defined( 'SP_BIRTHDAYS_VERSION' ) ) - define( 'SP_BIRTHDAYS_VERSION', '1.9.19' ); + define( 'SP_BIRTHDAYS_VERSION', '2.0.8' ); if ( !defined( 'SP_BIRTHDAYS_URL' ) ) define( 'SP_BIRTHDAYS_URL', plugin_dir_url( __FILE__ ) ); @@ -80,6 +81,16 @@ class SportsPress_Birthdays { return $translated_text; } + /** + * Add text options + */ + public function add_text_options( $options = array() ) { + return array_merge( $options, array( + __( 'Age', 'sportspress' ), + __( 'Birthday', 'sportspress' ), + ) ); + } + /** * Add options to player settings page. * diff --git a/readme.txt b/readme.txt index 61aa2d10..e4ac6fb2 100644 --- a/readme.txt +++ b/readme.txt @@ -241,6 +241,7 @@ When you upgrade to one of the SportsPress Pro licenses, you can simply activate = 2.0.8 = * Feature - Add shortcode parameter to filter event calendars by player. +* Feature - Add text options to change age and birthday labels. = 2.0.7 = * Feature - Add option to show or hide logos or photos in event blocks. diff --git a/wpml-config.xml b/wpml-config.xml index 86f86a9b..bc6cc339 100644 --- a/wpml-config.xml +++ b/wpml-config.xml @@ -1,7 +1,9 @@ + +