From 2ceb0c53a3bdafbe83b57a3800c26c557c372812 Mon Sep 17 00:00:00 2001 From: ThemeBoy Date: Sun, 1 Dec 2013 22:56:20 +1100 Subject: [PATCH] Remove comparison operators --- sportspress-actions.php | 4 ++-- sportspress-helpers.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sportspress-actions.php b/sportspress-actions.php index 2789aa23..7110519f 100644 --- a/sportspress-actions.php +++ b/sportspress-actions.php @@ -48,8 +48,8 @@ function sp_manage_posts_custom_column( $column, $post_id ) { break; case 'sp_equation': echo str_replace( - array( '+', '-', '*', '/', '==', '!=', '<', '<=', '>', '>=' ), - array( '+', '−', '×', '÷', '=', '≠', '<', '≤', '>', '≥' ), + array( '$', '+', '-', '*', '/' ), + array( '', '+', '−', '×', '÷' ), get_post_meta ( $post_id, 'sp_equation', true ) ); break; diff --git a/sportspress-helpers.php b/sportspress-helpers.php index 817ca9a9..abab1940 100644 --- a/sportspress-helpers.php +++ b/sportspress-helpers.php @@ -308,7 +308,7 @@ if ( !function_exists( 'sp_post_checklist' ) ) { } if ( !function_exists( 'sp_get_equation_optgroup_array' ) ) { - function sp_get_equation_optgroup_array( $postid, $type = null, $variations = null, $defaults = null, $plain = true ) { + function sp_get_equation_optgroup_array( $postid, $type = null, $variations = null, $defaults = null, $totals = true ) { $arr = array(); // Get stats within the sports that the current stat is in ### TODO: should be for sport selected @@ -332,7 +332,7 @@ if ( !function_exists( 'sp_get_equation_optgroup_array' ) ) { // Add vars to the array if ( isset( $variations ) && is_array( $variations ) ): foreach ( $vars as $var ): - if ( $plain ) $arr[ '$' . $var->post_name ] = $var->post_title; + if ( $totals ) $arr[ '$' . $var->post_name ] = $var->post_title; foreach ( $variations as $key => $value ): $arr[ '$' . $var->post_name . '_' . $key ] = $var->post_title . ' ' . $value; endforeach; @@ -378,7 +378,7 @@ if ( !function_exists( 'sp_get_equation_selector' ) ) { endforeach; // Create array of operators - $operators = array( '+' => '+', '-' => '−', '*' => '×', '/' => '÷', '==' => '=', '!=' => '≠', '<' => '<', '<=' => '≤', '>' => '>', '>=' => '≥', '(' => '(', ')' => ')' ); + $operators = array( '+' => '+', '-' => '−', '*' => '×', '/' => '÷', '(' => '(', ')' => ')' ); // Add operators to options $options[ __( 'Operators', 'sportspress' ) ] = $operators;