Skip to content

Instantly share code, notes, and snippets.


Micah Wood wpscholar

Block or report user

Report or block wpscholar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
wpscholar / cloudSettings
Last active May 28, 2020
Visual Studio Code Settings
View cloudSettings
wpscholar / prevent-plugin-updates.php
Created May 19, 2020
A WordPress MU plugin that can prevent plugin updates for specific plugins.
View prevent-plugin-updates.php
function ( $transient ) {
$plugins = array(
foreach ( $plugins as $plugin ) {
wpscholar / post-content-shortcode.php
Created May 22, 2020
A simple plugin providing a shortcode that will output the post content for a specific post ID.
View post-content-shortcode.php
* Post Content Shortcode
* @package PostContentShortcode
* @author Micah Wood
* @copyright Copyright 2020 by Micah Wood - All rights reserved.
* @license GPL2.0-or-later
* @wordpress-plugin
wpscholar / wp-snapshot-shortcode.php
Last active May 20, 2020
Shortcode displays snapshots of remote sites on your WordPress site.
View wp-snapshot-shortcode.php
* This shortcode will allow you to create a snapshot of a remote website and post it
* on your WordPress site.
* [snapshot url="" alt="" width="400" height="300"]
add_shortcode( 'snapshot', function ( $atts ) {
$atts = shortcode_atts( array(
wpscholar / single.php
Created May 8, 2020
A custom Stellar Places template to show nearby places.
View single.php
$place = Stellar_Places::get_place_object( get_post() );
$nearby = Stellar_Places::get_places(
'post__not_in' => array( get_the_ID() ),
'geo_query' => array(
'lat' => $place->latitude,
'lng' => $place->longitude,
'distance' => 1,
View wp-rest-api-demo.php
* Plugin Name: WP REST API Demo
* Plugin URI:
* Description: A developer plugin designed for playing around with the WordPress REST API.
* Version: 1.0
* Author: Micah Wood
* Author URI:
* License: GPL2
wpscholar / .eslintignore
Last active Apr 28, 2020
Webpack 4 Config for WordPress plugin, theme, and block development
View .eslintignore
wpscholar /
Created Apr 19, 2020
Install xdebug from the command line.
# Use homebrew to switch PHP versions, run this command for each version as needed:
pecl install xdebug
wpscholar / create-admin-user.php
Last active Apr 16, 2020
Create a new admin user in WordPress via code. Drop this file in the mu-plugins directory and update the variables, then load a page in WordPress to create the user. Remove the file when done.
View create-admin-user.php
add_action( 'init', function () {
$username = 'admin';
$password = 'password';
$email_address = '';
if ( ! username_exists( $username ) ) {
$user_id = wp_create_user( $username, $password, $email_address );
You can’t perform that action at this time.