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 | |
/** | |
* Kirki Sass Compiler | |
* | |
* Create a CSS file based on a SCSS-file and Kirki variables | |
* File gets saved in the public folder with a cache buster. | |
*/ | |
namespace App\Kirki; | |
use ScssPhp\ScssPhp\Compiler; |
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
/* | |
* URL updates and the element focus is maintained | |
* | |
* originally found via in Update 3 on http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links | |
* Author: HEATHER MIGLIORISI | |
* URL: https://css-tricks.com/smooth-scrolling-accessibility/ | |
*/ | |
// filter handling for a /dir/ OR /indexordefault.page | |
function filterPath(string) { |
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 my_theme_google_analytics() { ?> | |
<script> | |
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= | |
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; | |
e=o.createElement(i);r=o.getElementsByTagName(i)[0]; | |
e.src='//www.google-analytics.com/analytics.js'; | |
r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); | |
ga('create','GOOGLE ANALYTICS ID');ga('send','pageview'); | |
</script> | |
<?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
/* | |
* Custom method to make a yes no radio box only validate on yes | |
*/ | |
addSelectiveRadioMethod: function(){ | |
jQuery.validator.addMethod("requiredRadioValue", function(value, element, params) { | |
var selectedValue = $('input:radio[name=' + element.name + ']:checked').val(); | |
return selectedValue === params; | |
}, "You must select the required option."); | |
}, |
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
# One morning, when Gregor Samsa woke from troubled dreams. | |
One morning, when Gregor Samsa woke from troubled dreams, he found himself *transformed* in his bed into a horrible [vermin](http://en.wikipedia.org/wiki/Vermin "Wikipedia Vermin"). He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover **strong** it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, link waved abouthelplessly as he looked. <cite>“What's happened to me?”</cite> he thought. It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls.</p> | |
## The bedding was hardly able to cover it. | |
It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer a solid fur muff into which her entir |
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 | |
/** | |
* Get the urls of all the attached image sizes | |
* | |
* Array with image urls given when a correct image attachment ID is passed. | |
* similiar to core function wp_get_attachment_image() but for all the images. | |
* Biggest adventage is one db query for all intermediate_image_sizes | |
* | |
* @param int $post_id Attachment ID. |
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 | |
function antispambot_sc( $atts ) { | |
extract( shortcode_atts( array( | |
'email' => '' | |
), $atts ) ); | |
return antispambot( $email ); | |
} | |
add_shortcode( 'antispambot', 'antispambot_sc' ); | |
// Usage: [antispambot email="[email protected]"] | |
?> |
NewerOlder