Support » Plugin: The Events Calendar Category Colors » WPML Support

  • Plugin Author Andy Fragen

    (@afragen)


    WPML support is now here with version The Events Calendar Category Colors v4.6.1

    The user will need to add the translated category terms using a new filter hook. The format is as follows.

    
    add_filter( 'teccc_add_terms', function(){
    	$translated_terms = array(
    		'atelier-cuisine-en-anglais',
    		'atelier-cuisine-en-espagnol',
    		'atelier-cuisine-en-francais',
    		'cooking-classes-in-english',
    		'cooking-classes-in-french',
    		'cooking-classes-in-spanish',
    	);
    
    	return $translated_terms;
    });
    

    It is easiest to place this in your theme’s functions.php file. After doing so, you will find the categories in your settings section to colorize.

    The only real problem is if you are using the legend, all categories will display unless they are hidden.

    To remove these added categories you can do this directly from the _Events Categories_ page or use the following filter hook.

    
    add_filter( 'teccc_delete_terms', function(){
    	$translated_terms = array(
    		'atelier-cuisine-en-anglais',
    		'atelier-cuisine-en-espagnol',
    		'atelier-cuisine-en-francais',
    		'cooking-classes-in-english',
    		'cooking-classes-in-french',
    		'cooking-classes-in-spanish',
    	);
    
    	return $translated_terms;
    });
    

    Much thanks to jvier for testing.

    • This topic was modified 2 years, 7 months ago by  Andy Fragen.
  • The topic ‘WPML Support’ is closed to new replies.