Skip to content

Commit

Permalink
Adds constant check to replace rename conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
theenoahmason committed Feb 22, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7f2a227 commit 716bcf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -278,7 +278,7 @@ function replaceRename(args = null) {
file = newFile;
}
var content = fs.readFileSync(file, 'utf8');
if (/WP Theme/g.test(content) || /WP_Theme/g.test(content) || /wp-theme/g.test(content) || /wp_theme/g.test(content)) {
if (/WP Theme/g.test(content) || /WP_Theme/g.test(content) || /WP_THEME/g.test(content) || /wp-theme/g.test(content) || /wp_theme/g.test(content)) {
content = content
.replace(/WP Theme/g, args.themeName)
.replace(/WP_THEME/g, args.constantPrefix.replace(/[^a-zA-Z\d]/g, '_'))

0 comments on commit 716bcf7

Please sign in to comment.