| @@ 368-372 (lines=5) @@ | ||
| 365 | // Convert comma-separated terms to array before attempting to |
|
| 366 | // merge with hardcoded taxonomies |
|
| 367 | foreach ( $input['terms'] as $taxonomy => $terms ) { |
|
| 368 | if ( is_string( $terms ) ) { |
|
| 369 | $input['terms'][ $taxonomy ] = explode( ',', $terms ); |
|
| 370 | } else if ( ! is_array( $terms ) ) { |
|
| 371 | $input['terms'][ $taxonomy ] = array(); |
|
| 372 | } |
|
| 373 | } |
|
| 374 | ||
| 375 | // For each hard-coded taxonomy, merge into terms object |
|
| @@ 318-322 (lines=5) @@ | ||
| 315 | // Convert comma-separated terms to array before attempting to |
|
| 316 | // merge with hardcoded taxonomies |
|
| 317 | foreach ( $input[ $term_input_key ] as $taxonomy => $terms ) { |
|
| 318 | if ( is_string( $terms ) ) { |
|
| 319 | $input[ $term_input_key ][ $taxonomy ] = explode( ',', $terms ); |
|
| 320 | } else if ( ! is_array( $terms ) ) { |
|
| 321 | $input[ $term_input_key ][ $taxonomy ] = array(); |
|
| 322 | } |
|
| 323 | } |
|
| 324 | ||
| 325 | // For each hard-coded taxonomy, merge into terms object |
|