Remove metrics filter by position

This commit is contained in:
Brian Miyaji
2014-04-29 14:09:37 +10:00
parent 5f73097918
commit af8708247c

View File

@@ -20,7 +20,6 @@ class SP_Meta_Box_Player_Metrics {
*/ */
public static function output( $post ) { public static function output( $post ) {
$metrics = get_post_meta( $post->ID, 'sp_metrics', true ); $metrics = get_post_meta( $post->ID, 'sp_metrics', true );
$positions = get_the_terms( $post->ID, 'sp_position' );
$args = array( $args = array(
'post_type' => 'sp_metric', 'post_type' => 'sp_metric',
@@ -30,20 +29,6 @@ class SP_Meta_Box_Player_Metrics {
'order' => 'ASC', 'order' => 'ASC',
); );
if ( $positions ):
$position_ids = array();
foreach( $positions as $position ):
$position_ids[] = $position->term_id;
endforeach;
$args['tax_query'] = array(
array(
'taxonomy' => 'sp_position',
'field' => 'id',
'terms' => $position_ids,
),
);
endif;
$vars = get_posts( $args ); $vars = get_posts( $args );
if ( $vars ): if ( $vars ):