jayhill90 / genesis-generator Goto Github PK
View Code? Open in Web Editor NEWWordPress plugin to generate a child theme based on the Genesis Sample theme via WP-CLI
WordPress plugin to generate a child theme based on the Genesis Sample theme via WP-CLI
=== Genesis Generator === Contributors: jayhill90 Donate link: https://wpdev.life Tags: Genesis, theme, generator Requires at least: 4.5 Tested up to: 5.2.2 Stable tag: 0.4.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html This plugin adds a WP CLI command to be able to scaffold a Genesis Sample theme. == Description == This plugin adds a WP-CLI command to be able to generate a Genesis Sample theme, with all of the replacements being complete. This is a work in progress, and is meant as a proof of concept on how valuable this could be to Genesis core. Currently this only supports Genesis/Genesis Sample 3.0.1. If you're running 2.10 or lower please upgrade. I value feedback so if there's anything amiss feel free to open up an issue or hit me on twitter @wpdevlife. == Installation == Ensure the Genesis Framework is installed. Git clone this repo or download as zip to your plugins folder. Activate the plugin. Open up WP-CLI and run the wp scaffold genesis command. ex: wp scaffold genesis my-theme --author="Jay Hill" --uri="wpdev.life" --description="My awesome theme" --theme_uri="testinproduction.systems" Once complete, you can switch to your new theme with wp theme activate my-theme and begin development work. == Frequently Asked Questions == Does this pull Genesis themes like Academy Pro or another StudioPress theme? This will scaffold a new theme based on Genesis Sample and make the replacements to update Genesis Sample references. == Screenshots == Soon. == Changelog == = 0.4.2 = Fixed some missing replacement strings. = 0.4.1 = Added functionality to download Genesis Sample based on installed Genesis version = 0.4.0 = Added theme_uri author_uri description and other args for command. Expanded documentation. Cleaned up more code. = 0.1.2 = Ensured theme is installed locally. Minor bug fixes. = 0.1.0 = * Initial base functionality.
Great work on this, Jay!
I found a few Genesis Sample strings were present in a theme I generated with the command from your docs:
landing.php
: 'Genesis sample.' present in header.notice-update.js
: @package GenesisSample
in header.phpcs.xml.dist
: ruleset name="Genesis-Sample"
Ensure we're following all WordPress Code Standards where possible
Right now if we try to make a theme with the slug of a theme that exists we error out and have to manually remove the directory.
PHP Warning: rename(/wordpress/wp-content/themes/genesis-sample-master,/wordpress/wp-content/themes/my-theme3): Directory not empty in /wordpress/wp-content/plugins/genesis-generator/inc/class-zipper.php on line 22
Warning: rename(/wordpress/wp-content/themes/genesis-sample-master,/wordpress/wp-content/themes/my-theme3): Directory not empty in /wordpress/wp-content/plugins/genesis-generator/inc/class-zipper.php on line 22
Error: Failed to rename temp directory
We want to prompt overwriting/removing of the directory first.
Currently style.css has this docblock. Theme Name is properly transformed however Theme URI, Author, and Author UI are not.
Theme URI: https://demo.studiopress.com/
Description: This is the sample theme created for the Genesis Framework.
Author: StudioPress
Author URI: https://www.studiopress.com/
Currently when you run the following command you get the nest format back.
Theme Name: Test Theme
Theme URI: https://demo.Jay Hill/
Description: This is the sample theme created for the Genesis Framework.
Author:
Author URI: https://www.Jay Hill/
Should we switch to using the WP Filesystem API? https://developer.wordpress.org/reference/classes/wp_filesystem_direct/
We need tests written to ensure functionality.
Not everyone is running Genesis 3.X yet, it would be nice to be able to pass a version of Genesis Sample to grab.
example urls:
https://github.com/studiopress/genesis-sample/archive/2.10.0.zip
https://github.com/studiopress/genesis-sample/archive/2.9.0.zip
https://github.com/studiopress/genesis-sample/archive/3.0.1.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.