Add Home and Away subsets to Table Column Equation Builder
This commit is contained in:
@@ -23,6 +23,6 @@ class SP_Meta_Box_Column_Equation extends SP_Meta_Box_Equation {
|
||||
*/
|
||||
public static function output( $post ) {
|
||||
$equation = get_post_meta( $post->ID, 'sp_equation', true );
|
||||
self::builder( $post->post_title, $equation, array( 'team_event', 'outcome', 'result' ) );
|
||||
self::builder( $post->post_title, $equation, array( 'team_event', 'outcome', 'result', 'subset', 'preset' ) );
|
||||
}
|
||||
}
|
||||
@@ -41,12 +41,12 @@ class SP_Meta_Box_Equation {
|
||||
break;
|
||||
case 'outcome':
|
||||
$options[ 'Outcomes' ] = self::optgroup( 'sp_outcome' );
|
||||
$options[ 'Outcomes' ]['$gamesback'] = __( 'Games Back', 'sportspress' );
|
||||
$options[ 'Outcomes' ]['$homerecord'] = __( 'Home Record', 'sportspress' );
|
||||
$options[ 'Outcomes' ]['$awayrecord'] = __( 'Away Record', 'sportspress' );
|
||||
$options[ 'Outcomes' ]['$streak'] = __( 'Streak', 'sportspress' );
|
||||
$options[ 'Outcomes' ]['$last5'] = __( 'Last 5', 'sportspress' );
|
||||
$options[ 'Outcomes' ]['$last10'] = __( 'Last 10', 'sportspress' );
|
||||
break;
|
||||
case 'preset':
|
||||
$options[ 'Presets' ] = array( '$gamesback' => __( 'Games Back', 'sportspress' ), '$homerecord' => __( 'Home Record', 'sportspress' ), '$awayrecord' => __( 'Away Record', 'sportspress' ), '$streak' => __( 'Streak', 'sportspress' ), '$last5' => __( 'Last 5', 'sportspress' ), '$last10' => __( 'Last 10', 'sportspress' ) );
|
||||
break;
|
||||
case 'subset':
|
||||
$options[ 'Subsets' ] = array( '_home' => '@' . __( 'Home', 'sportspress' ), '_away' => '@' . __( 'Away', 'sportspress' ) );
|
||||
break;
|
||||
case 'performance':
|
||||
$options[ 'Performance' ] = self::optgroup( 'sp_performance' );
|
||||
@@ -151,7 +151,9 @@ class SP_Meta_Box_Equation {
|
||||
* @return null
|
||||
*/
|
||||
public static function equation_part_labels() {
|
||||
__( 'Presets', 'sportspress' );
|
||||
__( 'Operators', 'sportspress' );
|
||||
__( 'Subsets', 'sportspress' );
|
||||
__( 'Constants', 'sportspress' );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user