I switched to a new wordpress code highlight plugin, so I had to replace the old highlight string with a new. I issued 3 SQL commands that crawled my posts and updated them.
update wp_posts set post_content = replace(post_content, ‘<code lang="text">’, ‘<p lang="text" line="1">’);
update wp_posts set post_content = replace(post_content, ‘<code>’, ‘<p lang="text" line="1">’);
update wp_posts set post_content = replace(post_content, ‘</code>’, ‘</p>’);
replace(field_name, ‘find string’, ‘replace string’);
Here’s the MySQL doc.
Leave a Reply