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: WordPress Importer | |
Plugin URI: http://wordpress.org/extend/plugins/wordpress-importer/ | |
Description: Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file. | |
Author: wordpressdotorg | |
Author URI: http://wordpress.org/ | |
Version: 0.6.1 | |
Text Domain: wordpress-importer | |
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
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
$ npm install gulp-uncss gulp-exec --save-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 | |
function create_date_column_for_issues($issue_columns) { | |
$issue_columns['date'] = 'Date'; | |
return $issue_columns; | |
} | |
add_filter('manage_edit-issue_columns', 'create_date_column_for_issues'); |
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
[development] | |
127.0.0.1 ansible_ssh_port=2222 ansible_ssh_private_key_file=/Users/cfx/Sites/trellis/.vagrant/machines/default/virtualbox/private_key | |
[staging] | |
my-staging.com |
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
1. $ brew install fontforge ttf2eot ttfautohint | |
2. $ brew tap bramstein/webfonttools && brew install sfnt2woff | |
3. Download/clone https://github.com/google/woff2 into any handy dir | |
cd into dir and: | |
$ git submodule init | |
$ git submodule update | |
$ make clean all | |
then: |
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
function restrict_media_library_by_width($query) { | |
$include = array(); | |
$exclude = array(); | |
$temp_query = new WP_Query($query); | |
if($temp_query->have_posts()) { | |
while($temp_query->have_posts()) { | |
$temp_query->the_post(); | |
$meta = wp_get_attachment_metadata(get_the_ID()); | |
$meta['mime-type'] = get_post_mime_type(get_the_ID()); | |
if(isset($meta['mime-type']) && |
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
.select2-container { | |
margin: 0; | |
position: relative; | |
display: inline-block; | |
/* inline-block for ie7 */ | |
zoom: 1; | |
*display: inline; | |
vertical-align: middle; | |
padding-right: 8px; | |
padding-left: 8px; |
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 | |
function add_child_and_parent_to_acf_taxonomy_choices($choices) { | |
$tax_choices = array(); | |
foreach($choices as $taxonomy => $c) { | |
$tax_choices[$taxonomy] = $c; | |
if($taxonomy != 'all' && is_taxonomy_hierarchical($taxonomy)) { | |
$tax_choices[$taxonomy.'-tax_parent'] = $c.' (parent)'; | |
$tax_choices[$taxonomy.'-tax_child'] = $c.' (child)'; | |
} |
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 | |
function restrict_image_upload_size($file) { | |
if(!stristr($file['type'], 'image')) { // only run on images | |
return $file; | |
} | |
$img = getimagesize($file['tmp_name']); | |
$minimum = array('width' => '1024', 'height' => '768'); | |
$width = $img[0]; |