Automattic / babble

Multilingual WordPress done right.
https://wordpress.org/plugins/babble/
245 stars 50 forks source link

Introduce hashed names for shadow post types and taxonomies #301

Closed johnbillion closed 9 years ago

johnbillion commented 9 years ago

See discussion on #247.

This replaces overly long post type and taxonomy names with a crc32 hash of the name and language code. A crc32 hash is an 8 byte hexadecimal string.

Also introduces tests for hashed and non-hashed post type and taxonomy names, and tests for our assumptions about field lengths.

simonwheatley commented 9 years ago

@johnbillion We discussed adding _doing_it_wrong warnings be introduced for post type name and taxonomy name lengths over 20. Any issues with adding these?

johnbillion commented 9 years ago

Technically, the user isn't doing anything wrong, and it's not like they can do much about it if it's caused by a third party plugin. Babble now safely handles this case too; do you think we still need some sort of warning?