File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ public function list_( $args, $assoc_args ) {
149149 $ formatter = $ this ->get_formatter ( $ assoc_args );
150150
151151 // Check if it's strict mode or not.
152- $ is_strict = ( isset ( $ assoc_args[ ' strict ' ] ) && true === $ assoc_args [ 'strict ' ] ) ? true : false ;
152+ $ strict = Utils \get_flag_value ( $ assoc_args, 'strict ' , false ) ;
153153
154154 unset( $ assoc_args ['strict ' ] );
155155
@@ -161,9 +161,10 @@ public function list_( $args, $assoc_args ) {
161161 }
162162
163163 $ fields = $ formatter ->fields ;
164- $ taxonomies = ( $ is_strict ) ?
165- get_taxonomies ( $ assoc_args , 'objects ' ) :
166- get_object_taxonomies ( $ taxonomy_object , 'objects ' );
164+ $ taxonomies = ( isset ( $ taxonomy_object ) && ! $ strict )
165+ ? get_object_taxonomies ( $ taxonomy_object , 'objects ' )
166+ : get_taxonomies ( $ assoc_args , 'objects ' );
167+
167168 $ counts = [];
168169
169170 if ( count ( $ taxonomies ) > 0 && in_array ( 'count ' , $ fields , true ) ) {
You can’t perform that action at this time.
0 commit comments