From 308fe2358f5f9b493424711712941ff3dae708c6 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 24 Apr 2015 11:42:59 +1000 Subject: [PATCH] Get terms after other args are removed from array --- includes/sp-core-functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php index cc0b72cf..8b4e04d4 100644 --- a/includes/sp-core-functions.php +++ b/includes/sp-core-functions.php @@ -7,7 +7,7 @@ * @author ThemeBoy * @category Core * @package SportsPress/Functions - * @version 1.8 + * @version 1.8.1 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -514,7 +514,6 @@ if ( !function_exists( 'sp_dropdown_taxonomies' ) ) { $args = array_merge( $defaults, $args ); if ( ! $args['taxonomy'] ) return false; - $terms = get_terms( $args['taxonomy'], $args ); $name = ( $args['name'] ) ? $args['name'] : $args['taxonomy']; $id = ( $args['id'] ) ? $args['id'] : $name; @@ -535,6 +534,8 @@ if ( !function_exists( 'sp_dropdown_taxonomies' ) ) { $chosen = $args['chosen']; unset( $args['chosen'] ); + + $terms = get_terms( $args['taxonomy'], $args ); printf( '', $args['taxonomy'] );