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
/*-------------------------------------------------------------- | |
Callback function to filter the MCE settings | |
--------------------------------------------------------------*/ | |
function wpb_mce_buttons_2($buttons) { | |
array_unshift($buttons, 'styleselect'); | |
return $buttons; | |
} | |
add_filter('mce_buttons_2', 'wpb_mce_buttons_2'); | |
function my_mce_before_init_insert_formats( $init_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
/*-------------------------------------------------------------- | |
ACF styles and scripts | |
--------------------------------------------------------------*/ | |
function my_acf_admin_head() | |
{ | |
?> | |
<style type="text/css"> | |
/* ..styles.. */ |
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 if ( is_user_logged_in() ) { ?> | |
<span id="adminTrigger"> | |
<a href="#">Toggle</a> | |
</span> | |
<?php } ?> |
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
// WP Admin Bar | |
$wpNav = $('#wpadminbar'); | |
$wpNav.addClass('hide'); | |
$('#adminTrigger').on('click', function(){ | |
$(this).toggleClass('down'); | |
$wpNav.toggleClass('hide show'); | |
}); |
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
// WP admin hide and show | |
#wpadminbar { | |
@include transition(all, .4s, ease); | |
} | |
#wpadminbar.hide, #post-nav.hide { | |
@include translate(0, -90px); | |
@include transition(all, .4s, ease); | |
} | |
#adminTrigger { |
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
/*-------------------------------------------------------------- | |
Removes admin margin-top | |
--------------------------------------------------------------*/ | |
add_action('get_header', 'my_filter_head'); | |
function my_filter_head() { | |
remove_action('wp_head', '_admin_bar_bump_cb'); | |
} |
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
/*! Respond.js v1.4.2: min/max-width media query polyfill | |
* Copyright 2014 Scott Jehl | |
* Licensed under MIT | |
* http://j.mp/respondjs */ | |
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.s |
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
// Animation callback | |
var animEndEventNames = { | |
'WebkitAnimation' : 'webkitAnimationEnd',// Saf 6, Android Browser | |
'MozAnimation' : 'animationend', // only for FF < 15 | |
'animation' : 'animationend' // IE10, Opera, Chrome, FF 15+, Saf 7+ | |
}, | |
animEndEventName = animEndEventNames[ Modernizr.prefixed('animation') ]; | |
// Transition callback | |
var transEndEventNames = { |
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
// Hover functions | |
$('.class-name').on({ | |
mouseenter: function () { | |
}, | |
mouseleave: function () { | |
} |