Skip to content

Instantly share code, notes, and snippets.

@dbisso
Created January 15, 2013 19:24
Show Gist options
  • Save dbisso/4541235 to your computer and use it in GitHub Desktop.
Save dbisso/4541235 to your computer and use it in GitHub Desktop.
Phing: Target to fork _s (underscores) theme with new name
<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>
@dbisso
Copy link
Author

dbisso commented Jan 15, 2013

Ignores .git dir by default. Remove <exclude /> elements if you don't want that.

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