Remove comparison operators
This commit is contained in:
@@ -48,8 +48,8 @@ function sp_manage_posts_custom_column( $column, $post_id ) {
|
|||||||
break;
|
break;
|
||||||
case 'sp_equation':
|
case 'sp_equation':
|
||||||
echo str_replace(
|
echo str_replace(
|
||||||
array( '+', '-', '*', '/', '==', '!=', '<', '<=', '>', '>=' ),
|
array( '$', '+', '-', '*', '/' ),
|
||||||
array( '+', '−', '×', '÷', '=', '≠', '<', '≤', '>', '≥' ),
|
array( '', '+', '−', '×', '÷' ),
|
||||||
get_post_meta ( $post_id, 'sp_equation', true )
|
get_post_meta ( $post_id, 'sp_equation', true )
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ if ( !function_exists( 'sp_post_checklist' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !function_exists( 'sp_get_equation_optgroup_array' ) ) {
|
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();
|
$arr = array();
|
||||||
|
|
||||||
// Get stats within the sports that the current stat is in ### TODO: should be for sport selected
|
// 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
|
// Add vars to the array
|
||||||
if ( isset( $variations ) && is_array( $variations ) ):
|
if ( isset( $variations ) && is_array( $variations ) ):
|
||||||
foreach ( $vars as $var ):
|
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 ):
|
foreach ( $variations as $key => $value ):
|
||||||
$arr[ '$' . $var->post_name . '_' . $key ] = $var->post_title . ' ' . $value;
|
$arr[ '$' . $var->post_name . '_' . $key ] = $var->post_title . ' ' . $value;
|
||||||
endforeach;
|
endforeach;
|
||||||
@@ -378,7 +378,7 @@ if ( !function_exists( 'sp_get_equation_selector' ) ) {
|
|||||||
endforeach;
|
endforeach;
|
||||||
|
|
||||||
// Create array of operators
|
// Create array of operators
|
||||||
$operators = array( '+' => '+', '-' => '−', '*' => '×', '/' => '÷', '==' => '=', '!=' => '≠', '<' => '<', '<=' => '≤', '>' => '>', '>=' => '≥', '(' => '(', ')' => ')' );
|
$operators = array( '+' => '+', '-' => '−', '*' => '×', '/' => '÷', '(' => '(', ')' => ')' );
|
||||||
|
|
||||||
// Add operators to options
|
// Add operators to options
|
||||||
$options[ __( 'Operators', 'sportspress' ) ] = $operators;
|
$options[ __( 'Operators', 'sportspress' ) ] = $operators;
|
||||||
|
|||||||
Reference in New Issue
Block a user