- Prerequisites: Git, Ruby, WP-CLI, Node.JS, NPM, Bower, Sass, Gulp, Grunt (Grunt as a backup)
mkdir project.com.au
cd project.com.au/
wp core download
mysql -u [mysql-username] -p
# Enter MySQL password
#!/bin/bash | |
# Copyright © 2018 Matt Barrett - https://github.com/corradomatt | |
# Special thanks to https://gist.github.com/bjornjohansen/a00a9fee5475c4dadb56 | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
HTML_ROOT="/var/www/html" | |
WP_CLI="/usr/local/bin/wp" | |
SITES=$(find $HTML_ROOT ! -path $HTML_ROOT -maxdepth 1 -type d -exec echo {} \;) |
<?php | |
class MyPost extends Timber\Post | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
} | |
} |
// if an invalid form field has been made valid, | |
// remove the shouty error highlighting - if a valid | |
// required field has been made invalid, start shouting | |
$('input, textarea, select').on('change', function(){ | |
var $input = $(this); | |
var isRequired = $input.parents('.gfield').is('.gfield_contains_required'); | |
var isValid = $input.is(':valid'); | |
if ( isRequired && isValid ) { |
// ---- | |
// libsass (v3.2.4) | |
// ---- | |
%placeholder { | |
display: block; | |
} | |
.another-test { | |
background: red; |
// ---- | |
// libsass (v3.2.4) | |
// ---- | |
.another-test { | |
background: red; | |
} | |
%placeholder { | |
display: block; |
<!DOCTYPE html> | |
<head> | |
<!--Little CSS fade in --> | |
<style> | |
.fadeIn{ | |
-webkit-animation: fade-in 2s ease; | |
-moz-animation: fade-in ease-in-out 2s both; | |
-ms-animation: fade-in ease-in-out 2s both; | |
-o-animation: fade-in ease-in-out 2s both; |
<?php | |
//Based on Ohad Raz - https://en.bainternet.info/custom-post-types-columns/ | |
//Some info: | |
// The classes read the meta field of the CPT ID and enable the sorting | |
// Is possible remove other column | |
// Support 4 type of object natively: Title, Thumbnail, Custom taxonomy, Custom Field | |
// Add a filter cpt_columns_text_{column_name_id} in Title type | |
// prefix/suffix values are for all the objects except post_thumb | |
// New features by Mte90: |
<?php | |
Redux::setSection( $opt_name, array( | |
'title' => __( 'Text Area', 'redux-framework-demo' ), | |
'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>', | |
'id' => 'opt-textarea-subsection', | |
'subsection' => true, | |
'fields' => array( | |
array( | |
'id' => 'background-parallax', |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |