This file contains 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
// add the action | |
add_action('wp_print_styles', 'ac_remove_default_styles'); | |
function ac_remove_default_styles () | |
{ | |
// get all styles data | |
global $wp_styles; | |
$styles_to_keep = array('admin-menu'); |
This file contains 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 ac_inspect_scripts() { | |
global $wp_styles; | |
echo '<script id="ac_inspect_scripts">'; | |
foreach( $wp_styles->queue as $handle ) : | |
echo 'console.log("' . $handle . '");'; | |
endforeach; | |
echo '</script>'; | |
} | |
add_action( 'wp_print_scripts', 'ac_inspect_scripts' ); |
This file contains 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
#Run this in terminal before starting vagrant ssh | |
export VAGRANT_PREFER_SYSTEM_BIN=1 |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "scotch/box" | |
config.vm.network "private_network", ip: "192.168.33.25" | |
config.vm.hostname = "scotchbox" | |
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"] | |
config.vm.provision :shell, path: "phpmyadmin.sh" |
This file contains 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 titleCase(str) { | |
str = str.toLowerCase().split(' '); | |
for (var i = 0; i < str.length; i++) { | |
str[i] = str[i].charAt(0).toUpperCase() + str[i].slice(1); | |
} | |
return str.join(' '); | |
} | |
var bcElements = document.querySelectorAll('[data-breadcrumbs]'); | |
var currentPath = window.location.pathname; |
This file contains 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 acDefer(successMethod, failMethod, testMethod, pause, attempts) { | |
var defTest = function () { | |
return window.jquery; | |
}; | |
var defFail = function () { | |
console.log('jQuery not load'); | |
} | |
var defSuccess = function () { | |
console.log('jQuery load'); | |
} |
This file contains 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
/** | |
* Created by Richard on 19/09/2016. | |
*/ | |
//console.log('ACTIMBER'); | |
ACSCRIPT = { | |
common: { | |
init: function () { | |
'use strict'; | |
//uncomment to debug |
This file contains 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
@media | |
(-webkit-min-device-pixel-ratio: 2), | |
(min-resolution: 192dpi) { | |
/* Retina-specific stuff here */ | |
} | |
/* 1.25 dpr */ | |
@media | |
(-webkit-min-device-pixel-ratio: 1.25), | |
(min-resolution: 120dpi){ |
This file contains 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 | |
/** | |
* General Configuration | |
* | |
* All of your system's general configuration settings go in here. | |
* You can see a list of the default settings in craft/app/etc/config/defaults/general.php | |
*/ | |
This file contains 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
<nav class="locale-switch"> | |
<ul class="locale-switch__list"> | |
{% set locales = craft.i18n.getSiteLocales() %} | |
{% for locale in locales %} | |
{% set entryURL = craft.config.siteUrl[locale.id] %} | |
{% if entry is defined %} | |
{% set entryLocal = craft.entries.id(entry.id).locale(locale.id).first %} |