Skip to content

Instantly share code, notes, and snippets.

@WPsites
Created May 28, 2012 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WPsites/2820551 to your computer and use it in GitHub Desktop.
Save WPsites/2820551 to your computer and use it in GitHub Desktop.
If you use the _s starter theme from automattic you can enter these commands to replace _s with your theme name
# Search for:'_s', Replace with:'yourthemename' (text domain)
find . -type f \( -iname "*.php" -o -iname "*.css" -o -iname "*.txt" \) -exec sed -i "" "s/\'_s\'/\'yourthemename\'/g" '{}' \;
# Search for:_s_, Replace with:yourthemename_ (function names)
find . -type f \( -iname "*.php" -o -iname "*.css" -o -iname "*.txt" \) -exec sed -i "" "s/_s_/yourthemename_/g" '{}' \;
# Search for: _s, Replace with: Yourthemename (in comments)
find . -type f \( -iname "*.php" -o -iname "*.css" -o -iname "*.txt" \) -exec sed -i "" "s/ _s/ Yourthemename/g" '{}' \;
# Don't remove the space in ' Yourthemename'
@WPsites
Copy link
Author

WPsites commented May 28, 2012

The _s starter theme is located on Github https://github.com/Automattic/_s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment