A Pen by Fabrizio Bianchi on CodePen.
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
// http://mattbanks.me/grunt-wordpress-development-deployments/ | |
// https://github.com/mattbanks/WordPress-Starter-Theme/blob/master/Gruntfile.js | |
'use strict'; | |
module.exports = function (grunt) { | |
// load all grunt tasks matching the `grunt-*` pattern | |
require('load-grunt-tasks')(grunt); | |
var $proxy = 'vvv_domain.dev'; |
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 | |
/** | |
* Register Custom Status | |
* | |
*/ | |
function custom_archived_post_status() { | |
$args = array( |
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
cd $(brew --repository) | |
sudo chown -R $USER . | |
git reset --hard origin/master | |
brew update |
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
#!/bin/bash | |
# | |
# provision.sh | |
# | |
# This file is specified in Vagrantfile and is loaded by Vagrant as the primary | |
# provisioning script whenever the commands `vagrant up`, `vagrant provision`, | |
# or `vagrant reload` are used. It provides all of the default packages and | |
# configurations included with Varying Vagrant Vagrants. | |
# By storing the date now, we can calculate the duration of provisioning at the |
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
// Breaks ORDER BY silently | |
$sql = $this->wpdb->prepare( "SELECT * FROM $this->table ORDER BY 'id' ASC LIMIT %d OFFSET %d", $limit, $start ); | |
// Works correctly | |
$sql = $this->wpdb->prepare( "SELECT * FROM $this->table ORDER BY id ASC LIMIT %d OFFSET %d", $limit, $start ); | |
$rows = $this->wpdb->get_results( $sql ); | |
return $rows; |
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 | |
/** | |
* Blocks Admin Panel from loading Google Fonts - Open Sans, mainly for work offline. I hate the lag when there is no internet. | |
* | |
* Created 6/21/14, 12:57 PM | |
* | |
* @category WordPress Plugin | |
* @package Block External Scripts - block_external_scripts.php | |
* @author Jeff Behnke <[email protected]> |
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
FIND | |
<param name="dynamicStreaming" value="true" /> | |
AFTER ADD | |
<param name="includeAPI" value="true" /> | |
<param name="templateLoadHandler" value="BCL.onTemplateLoaded" /> | |
<param name="templateReadyHandler" value="BCL.onTemplateReady" /> | |
Which should be before | |
<param name="@videoPlayer" value="some_video_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 | |
/** | |
* Abstract class which has helper functions to get data from the database | |
*/ | |
abstract class Base_Custom_Data | |
{ | |
/** | |
* The current table name | |
* | |
* @var boolean |
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 | |
// Updated, the other expression misses stuff like nulla.jpg which broke images | |
// (?<!-)\b(ipsum|nulla|Nulla)\b(?!\/|\"|\.[a-zA-Z0-9]) | |
//---------------------------- | |
// Example string | |
//---------------------------- | |
?> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc feugiat laoreet augue, non congue lectus mattis nec. Etiam augue risus, consequat et sodales at, scelerisque id orci. Sed posuere egestas tristique. Aenean fermentum volutpat nisi, nulla vitae convallis risus mollis vel. <a title="nulla" href="http://nulla/nulla">Nulla</a> Nulla convallis venenatis tortor, nec congue augue hendrerit quis. Fusce augue metus, venenatis posuere ornare quis, scelerisque sed quam. <img alt="ipsum" src="ipsum.png" title="ipsum">Nunc nec adipiscing justo. Morbi eget ultrices diam. Proin nisl nisl, aliquet quis aliquet non, sollicitudin ultricies lectus. Etiam malesuada mauris quis sem varius hendrerit. Etiam eu tempor magna. Donec quam metus, elementum eget sollicitudin adipiscing, porttitor di |