I’ve noticed the first time today that WP is adding numbered class names (p1,p2…) to my p tags.
I have the following TinyMCE init related part in the functions.php.
function my_mce( $init ) {
$init['block_formats'] = "Paragraph=p; Heading 3=h3; Heading 4=h4";
$style_formats = array(
array(
'title' => 'Link',
'selector' => 'a',
'classes' => 'link'
)
);
$init['style_formats'] = json_encode( $style_formats );
return $init;
}
add_filter('tiny_mce_before_init', 'my_mce');
In my php an example snippet (using ACF options field) looks like that:
<div class="dataprivacy__feature">
<h3 class="lat-bn">Google Analytics</h3>
<?php the_field('op-dataprivacy-analytics', 'option'); ?>
</div>
The outputted p tag get the p1 class:
<div class="dataprivacy__feature">
<h3 class="lat-bn">Google Analytics</h3>
<p class="p1">Privacy statement</p>
<p class="p1 link">More <a title="Google Privacy" href="http://www.google.de/intl/de/privacy/" target="_blank">infos</a>.</p>
</div>
Is it possible to prevent that?