Created
June 25, 2020 06:13
-
-
Save gormus/bb9ef6f608b3110ae6fa21002cacc6b7 to your computer and use it in GitHub Desktop.
WP CLI search-replace normalize syntax highlighting wrapper markup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
wp search-replace '<pre[^>]*>(<code[^>]*>)*' '<pre><code>' 'wp_posts' \ | |
--regex \ | |
--regex-flags='i' \ | |
--skip-plugins \ | |
--skip-themes \ | |
--skip-packages \ | |
--color \ | |
--include-columns='post_content' \ | |
--dry-run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment