Remove comparison operators

This commit is contained in:
ThemeBoy
2013-12-01 22:56:20 +11:00
parent cce1586c75
commit 2ceb0c53a3
2 changed files with 5 additions and 5 deletions

View File

@@ -48,8 +48,8 @@ function sp_manage_posts_custom_column( $column, $post_id ) {
break;
case 'sp_equation':
echo str_replace(
array( '+', '-', '*', '/', '==', '!=', '<', '<=', '>', '>=' ),
array( '&plus;', '&minus;', '&times;', '&divide', '=', '&ne;', '&lt;', '&le;', '&gt;', '&ge;' ),
array( '$', '+', '-', '*', '/' ),
array( '', '&plus;', '&minus;', '&times;', '&divide' ),
get_post_meta ( $post_id, 'sp_equation', true )
);
break;

View File

@@ -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( '+' => '&plus;', '-' => '&minus;', '*' => '&times;', '/' => '&divide;', '==' => '=', '!=' => '&ne;', '<' => '<', '<=' => '&le;', '>' => '>', '>=' => '&ge;', '(' => '(', ')' => ')' );
$operators = array( '+' => '&plus;', '-' => '&minus;', '*' => '&times;', '/' => '&divide;', '(' => '(', ')' => ')' );
// Add operators to options
$options[ __( 'Operators', 'sportspress' ) ] = $operators;