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; break;
case 'sp_equation': case 'sp_equation':
echo str_replace( echo str_replace(
array( '+', '-', '*', '/', '==', '!=', '<', '<=', '>', '>=' ), array( '$', '+', '-', '*', '/' ),
array( '&plus;', '&minus;', '&times;', '&divide', '=', '&ne;', '&lt;', '&le;', '&gt;', '&ge;' ), array( '', '&plus;', '&minus;', '&times;', '&divide' ),
get_post_meta ( $post_id, 'sp_equation', true ) get_post_meta ( $post_id, 'sp_equation', true )
); );
break; break;

View File

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