This plugin is designed to be the instructional companion to the WordCamp Miami 2018 Developer workshop.
In its default state this plugin does nothing. Throughout the workshop we will be enabling each new section and writing code to power our custom blocks. To enable each custom block, edit the
gutendev.php file and uncomment the include statement for the given section. The
*-complete directory includes final, working code for each lesson. Review and include these directories to see the desired outcome after practicing yourself in the working directories.
This plugin can be installed like every other WordPress plugin:
- Add this plugin's folder to the
git clone firstname.lastname@example.org:brichards/gutendev.git)
- Activate the plugin either via the 'Plugins' menu in WordPress or via WP-CLI (e.g.
wp plugin activate gutendev)
git clone https://github.com/caldera-learn/alert-block.git inside your wp-content/plugins directory)
WCMIA 2018 Developer Workshop
Hello! We are all very excited to host you for the Future of WordPress Development Workshop. Below are some notes to help you prepare for Friday's day-long event.
Ideally, you're already comfortable creating custom plugins and writing your own JS interactions. Nevertheless, each speaker has worked hard to make the code examples accessible and as well-documented as possible. We have also prepared abundant resource material for further self-directed learning. If you get stuck, and our presenters cannot help you get unstuck, simply skip the practice assignments for now. Enjoy the presenters' slides and demos during the workshop then dive into the material again after you get home.
If you would like to practice alongside the presenters throughout the development workshop, you'll want to have a solid local development environment with all the following already installed before you arrive:
- WordPress 4.9+
- Gutenberg plugin
- node.js & npm
- Your favorite code editor (we like Sublime, VS Code, Atom, and many, many others, but stick with what you love).
Finally, you'll want to clone our GutenDev sample plugin from its GitHub repo into your development site's plugins directory. It's inside this plugin where we'll be practicing.
Need a local development environment?
If you don't already have a good, working local development environment we recommend installing for this workshop Local, by Flywheel (it's free). There are many great tools to choose from, though, if you'd like something different. We have instructions below for getting Local setup and configured in 6 easy steps.
code lines below are items to be copy/pasted directly into the SSH terminal.
0. Install Local by Flywheel
1. Disable "Faster Docker Volumes" in Local's Advanced Preferences
This step is necessary for git to have write permissions inside an SSH connection:
2. Create a new site inside Local
- Take note of your selected URL, username, and password
- Once the site has been provisioned, right-click on the site and open an SSH terminal:
3. Install git
apt-get update && apt-get -y install git wget
4. Install node and npm
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | NVM_DIR=/usr/local/nvm bash && \. /usr/local/nvm/nvm.sh && nvm install node
5. Install gutenberg and the workshop starter plugin
wp plugin install --activate gutenberg
git clone https://github.com/brichards/gutendev.git
git clone https://github.com/caldera-learn/alert-block.git
wp plugin activate gutendev alert-block
6. Update WP-CLI to latest release
wp cli update --yes
Visit your local site in the browser and open the starter plugin in your code editor of choice.