• Hello! πŸ™‚

    I love this plugin very much, great effort!
    But it lacks some important functionality to work 100% percent with WPML.

    When registering a taxonomy from a post type, there should be a possibility to alter the taxonomy name as there sometimes is a problem with both a post type and a taxonomy that has the same name.

    For example, the WPML-function “icl_object_id” will not work as intended. This is because when trying to translate a post of a post type that is used as a taxonomy, WPML will believe that we are trying to translate a taxonomy and not a post.

    This happens in the following file in WPML: sitepress.class.php:4525
    As you can see here it will get a hit on a taxonomy before it gets to the part when it checks for custom post types.
    WPML version: 3.6.2

    I would believe the fix is fairly easy.
    When registering the taxonomy then maybe make a difference between the CPT key and the name of the taxonomy. Maybe add a filter so that the developer can decide if there should be a difference or not.

    Example:

    We got a custom post type called “ship”.
    Then we could decide to register the CPT-onomy as “taxonomy_ship” instead of “ship”

    $taxonomy_name = add_filter('custom_post_type_onomies_prefix', function($taxonomy_name) {
    return 'taxonomy_' . $taxonomy_name;
    });

    What do you think?
    Best wishes, Robert Sather.

    • This topic was modified 9 years, 5 months ago by Robert S..
    • This topic was modified 9 years, 5 months ago by Robert S..

The topic ‘Feature request: taxonomy name filter’ is closed to new replies.