344 | | if ( strlen( $taxonomy ) > 32 ) { |
345 | | _doing_it_wrong( __FUNCTION__, __( 'Taxonomies cannot exceed 32 characters in length' ), '4.0' ); |
346 | | return new WP_Error( 'taxonomy_too_long', __( 'Taxonomies cannot exceed 32 characters in length' ) ); |
| 344 | $taxonomy_length = strlen( $taxonomy ); |
| 345 | if ( $taxonomy_length > 32 ) { |
| 346 | _doing_it_wrong( __FUNCTION__, __( 'Taxonomies cannot exceed 32 characters in length.' ), '4.0' ); |
| 347 | return new WP_Error( 'taxonomy_too_long', __( 'Taxonomies cannot exceed 32 characters in length.' ) ); |
| 348 | } elseif ( $taxonomy_length === 0 ) { |
| 349 | _doing_it_wrong( __FUNCTION__, __( 'Cannot register a taxonomy with an empty name.' ), '4.2' ); |
| 350 | return new WP_Error( 'taxonomy_empty_name', __( 'Cannot register a taxonomy with an empty name.' ) ); |