You need some html entity decode for labels
-
Hi,
I’m a french guy, so my labels can contain some apostrophes, like “Domaines d’activité”. Try to add such labels and you will see that the output will be encoded html entities. I had to fix this by adding this filter :add_filter('register_post_type_args', 'fix_cpt_labels_apostrophe', 10, 2);
function fix_cpt_labels_apostrophe($args, $post_type) {
if (!empty($args['labels'])) {
foreach ($args['labels'] as $key => $label) {
$args['labels'][$key] = html_entity_decode($label);
}
}
return $args;
}I’m sure you can do it in your plugin’s code in order for us to don’t apply it manually.
You’re welcome. Regards.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.