Changeset 2099652
- Timestamp:
- 06/03/2019 07:57:56 AM (7 years ago)
- Location:
- sportspress-for-golf
- Files:
-
- 6 edited
-
tags/0.9.1/license.txt (modified) (1 diff)
-
tags/0.9.1/readme.txt (modified) (1 diff)
-
tags/0.9.1/sportspress-for-golf.php (modified) (2 diffs)
-
trunk/license.txt (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/sportspress-for-golf.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sportspress-for-golf/tags/0.9.1/license.txt
r1619089 r2099652 1 1 SportsPress for Golf 2 2 3 Copyright 201 7by ThemeBoy3 Copyright 2019 by ThemeBoy 4 4 5 5 This program is free software; you can redistribute it and/or modify -
sportspress-for-golf/tags/0.9.1/readme.txt
r1765931 r2099652 4 4 Donate link: http://tboy.co/donate 5 5 Requires at least: 3.8 6 Tested up to: 4.96 Tested up to: 5.2 7 7 Stable tag: 0.9.1 8 8 License: GPLv3 -
sportspress-for-golf/tags/0.9.1/sportspress-for-golf.php
r1619089 r2099652 43 43 add_filter( 'sportspress_equation_options', array( $this, 'equation_options' ) ); 44 44 add_filter( 'sportspress_event_result_equation_vars', array( $this, 'equation_vars' ), 10, 3 ); 45 46 // Format results to reflect if over or under par 47 add_filter( 'sportspress_event_results', array( $this, 'results' ), 10, 4 ); 45 48 46 49 // Add number of holes to event meta box … … 281 284 } 282 285 286 /** 287 * Format results to reflect if over or under par. 288 */ 289 public function results( $results = array(), $id = 0 ) { 290 foreach ( $results as $team_id => $team_results ) { 291 if ( ! is_array( $team_results ) ) continue; 292 if ( ! $team_id ) continue; 293 foreach ( $team_results as $key => $value ) { 294 if ( 'par' !== $key ) continue; 295 $results[ $team_id ][ $key ] = sprintf( "%+d", $value ); 296 } 297 } 298 return $results; 299 } 300 283 301 /** 284 302 * Text filter. -
sportspress-for-golf/trunk/license.txt
r1619089 r2099652 1 1 SportsPress for Golf 2 2 3 Copyright 201 7by ThemeBoy3 Copyright 2019 by ThemeBoy 4 4 5 5 This program is free software; you can redistribute it and/or modify -
sportspress-for-golf/trunk/readme.txt
r1765931 r2099652 4 4 Donate link: http://tboy.co/donate 5 5 Requires at least: 3.8 6 Tested up to: 4.96 Tested up to: 5.2 7 7 Stable tag: 0.9.1 8 8 License: GPLv3 -
sportspress-for-golf/trunk/sportspress-for-golf.php
r1619089 r2099652 43 43 add_filter( 'sportspress_equation_options', array( $this, 'equation_options' ) ); 44 44 add_filter( 'sportspress_event_result_equation_vars', array( $this, 'equation_vars' ), 10, 3 ); 45 46 // Format results to reflect if over or under par 47 add_filter( 'sportspress_event_results', array( $this, 'results' ), 10, 4 ); 45 48 46 49 // Add number of holes to event meta box … … 281 284 } 282 285 286 /** 287 * Format results to reflect if over or under par. 288 */ 289 public function results( $results = array(), $id = 0 ) { 290 foreach ( $results as $team_id => $team_results ) { 291 if ( ! is_array( $team_results ) ) continue; 292 if ( ! $team_id ) continue; 293 foreach ( $team_results as $key => $value ) { 294 if ( 'par' !== $key ) continue; 295 $results[ $team_id ][ $key ] = sprintf( "%+d", $value ); 296 } 297 } 298 return $results; 299 } 300 283 301 /** 284 302 * Text filter.
Note: See TracChangeset
for help on using the changeset viewer.