- VirtualBox - Virtualization software for running local operating systems within your computer. This let's us have a full version of linux within our computers that better matches how a live webserver works.
- Vagrant - A tool for provisioning virtual machines.
- VVV - A pre-built, community supported Vagrant configuration for WordPress development.
- Git - Version control system for managing code during development. Easily allows for tracking changes, and merging new code into an existing project.
- SourceTree - A GUI available on Windows and Mac for managing Git projects. This makes Git much easier to use, as we won't have to learn the command line interface.
- GitHub.com - A website that provides free Git repos for both open source and private projects.
- SASS - (we'll use the SCSS flavor) A CSS preprocessor that allows us to write much less CSS for a project. This basically makes CSS into a simple programming language.
This file contains hidden or 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
<?php | |
/** | |
* Display Site ID next to site name | |
*/ | |
add_action( 'admin_bar_menu', function( $wp_admin_bar ) { | |
// Check to make sure user is super admin | |
if ( is_super_admin() ) { | |
// Get site name node and Blog ID | |
$site_name_node = $wp_admin_bar->get_node( 'site-name' ); | |
$blog_id = get_current_blog_id(); |
This file contains hidden or 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
<?php | |
/* | |
Plugin Name: Fix WooCommerce Template Cache | |
Plugin URI: https://woocommerce.com | |
Description: This fixes some issues with WC's template caching on sites that use multiple containers, due to the entire path being cached. If the file does not exist, this script uses default WC logic (copy/pasted) to grab the correct templates. | |
Version: 1.0.0 | |
Author: Julien Melissas | |
Author URI: https://julienmelissas.com | |
*/ | |
add_filter('wc_get_template_part', function( $template, $slug, $name ) { |
This file contains hidden or 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
<?php | |
/** | |
* Label Assets | |
* | |
* @package label | |
* @since 1.0 | |
*/ | |
namespace Craftpeak\Label\Assets; |
This file contains hidden or 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
<?php | |
use ClassName; | |
$panels = [ | |
'general_settings' => [ | |
'priority' => 10, | |
'title' => __('General Settings', 'label'), | |
'description' => __('General settings for this site', 'label'), | |
'sections' => [ | |
'general_colors' => [ |
This file contains hidden or 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
import React from 'react'; | |
import Formsy from 'formsy-react'; | |
import ReactSelect from 'react-select'; | |
// Dont forget to import your styles somewhere | |
const Select = React.createClass({ | |
mixins: [Formsy.Mixin], |
This file contains hidden or 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
// Here's the data: | |
var data = {"e":{"a":{"e":-39,"c":119,"a":{"c":65,"a":"orange","b":"green","d":"orange"},"g":"violet","b":{"e":6,"c":{"c":"violet","a":8,"b":["red",{"a":37},"green",84,"yellow","green",[24,45,"blue","blue",56,"yellow"],"orange"]},"a":"violet","b":{"a":85},"d":[109,66,["yellow","violet",21,-30],"violet","blue",-43,{"e":"violet","c":"red","a":"blue","b":-22,"d":[71,"red",30,"violet","red",26,120],"f":["red"]},"red"]},"d":{"e":"violet","a":"blue","d":"blue","c":"blue","h":"orange","b":{"e":"red","a":{"c":115,"a":137,"b":"green"},"d":-25,"c":"blue","h":{"a":161,"b":["yellow",56,129,-31,"yellow","red","green",105,"orange",130]},"b":142,"g":194,"f":122,"i":-16},"g":173,"f":["orange","green",54,-9],"i":-23},"f":{"c":110,"a":"yellow","b":[{"a":155},156,"violet",94,"yellow"],"d":{"e":91,"a":-18,"d":"red","c":["green","orange","orange",190,"yellow",158,"blue","orange","blue",4],"h":143,"b":"orange","g":145,"f":["orange",37,"yellow",-22,{"c":30,"a":78,"b":196,"d":84},-7,["yellow"]]}}},"b":[[{"c":0,"a |
This file contains hidden or 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
<?php | |
/* | |
Plugin Name: Sort Posts by Menu Order (SPBMO) | |
Description: This plugin adds support to posts or custom post types for menu order, and sorts queries for those post types by menu_order on the front end. It's reccommended that you download <a href="https://wordpress.org/plugins/simple-page-ordering/">Simple Page Ordering</a> if you'd like to display by menu_order in the admin and to add Drag/Drop support. | |
Plugin URI: http://julienmelissas.com/add-drag-drop-support-to-posts | |
Author: Julien Melissas | |
Author URI: http://julienmelissas.com | |
Version: 1.0 | |
*/ |
This file contains hidden or 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
<html> | |
<head> | |
<title>Haversine Test</title> | |
</head> | |
<body> | |
<script> | |
myLoc = { | |
lat: 35.597982, | |
lng: -82.551416 |
This file contains hidden or 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
/* | |
This will compile code for an element you want to center exactly inside a div, just give it the width and height. | |
You must know the width and height, and the parent element must be relatively positioned | |
See this article here on CSS tricks: http://css-tricks.com/centering-in-the-unknown/ | |
Use like this for example: | |
#center-me { | |
.center(300px, 400px); | |
} | |
*/ |
NewerOlder