Created
January 15, 2013 19:24
-
-
Save dbisso/4541235 to your computer and use it in GitHub Desktop.
Phing: Target to fork _s (underscores) theme with new name
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
<target name="fork-underscores"> | |
<input propertyname="theme.name">What do you want to name your _s theme (eg mythemename)?</input> | |
<copy todir="wp-content/themes/${theme.name}"> | |
<fileset dir="wp-content/themes/_s"> | |
<exclude name=".git" /> | |
<exclude name=".git/*" /> | |
</fileset> | |
<filterchain> | |
<replaceregexp> | |
<regexp pattern="'_s'" replace="'${theme.name}'" ignoreCase="true"/> | |
<regexp pattern="_s_" replace="${theme.name}_" ignoreCase="true"/> | |
<regexp pattern=" _s" replace=" ${theme.name}" ignoreCase="true"/> | |
</replaceregexp> | |
</filterchain> | |
</copy> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ignores .git dir by default. Remove
<exclude />
elements if you don't want that.