Changeset 53309
- Timestamp:
- 04/29/2022 12:34:35 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-term-query.php
r53302 r53309 458 458 } 459 459 460 if ( empty( $args['exclude'] ) ) { 461 $args['exclude'] = array(); 462 } 463 464 if ( empty( $args['include'] ) ) { 465 $args['include'] = array(); 466 } 467 460 468 $exclude = $args['exclude']; 461 469 $exclude_tree = $args['exclude_tree']; -
trunk/tests/phpunit/tests/term/getTerms.php
r52970 r53309 3147 3147 ), 3148 3148 ), 3149 'array exclude vs no exclude' => array( 3150 array( 3151 'taxonomy' => self::$taxonomy, 3152 'fields' => 'ids', 3153 ), 3154 array( 3155 'taxonomy' => self::$taxonomy, 3156 'fields' => 'all', 3157 'exclude' => array(), 3158 ), 3159 ), 3160 'array exclude vs zero exclude' => array( 3161 array( 3162 'taxonomy' => self::$taxonomy, 3163 'fields' => 'ids', 3164 'exclude' => 0, 3165 ), 3166 array( 3167 'taxonomy' => self::$taxonomy, 3168 'fields' => 'all', 3169 'exclude' => array(), 3170 ), 3171 ), 3172 'array exclude vs string exclude' => array( 3173 array( 3174 'taxonomy' => self::$taxonomy, 3175 'fields' => 'ids', 3176 'exclude' => '', 3177 ), 3178 array( 3179 'taxonomy' => self::$taxonomy, 3180 'fields' => 'all', 3181 'exclude' => array(), 3182 ), 3183 ), 3184 'array include vs no include' => array( 3185 array( 3186 'taxonomy' => self::$taxonomy, 3187 'fields' => 'ids', 3188 ), 3189 array( 3190 'taxonomy' => self::$taxonomy, 3191 'fields' => 'all', 3192 'include' => array(), 3193 ), 3194 ), 3195 'array include vs zero include' => array( 3196 array( 3197 'taxonomy' => self::$taxonomy, 3198 'fields' => 'ids', 3199 'include' => 0, 3200 ), 3201 array( 3202 'taxonomy' => self::$taxonomy, 3203 'fields' => 'all', 3204 'include' => array(), 3205 ), 3206 ), 3207 'array include vs string include' => array( 3208 array( 3209 'taxonomy' => self::$taxonomy, 3210 'fields' => 'ids', 3211 'include' => '', 3212 ), 3213 array( 3214 'taxonomy' => self::$taxonomy, 3215 'fields' => 'all', 3216 'include' => array(), 3217 ), 3218 ), 3149 3219 'array 1 slug vs string slug' => array( 3150 3220 array(
Note: See TracChangeset
for help on using the changeset viewer.