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
| tell application "CodeKit" | |
| set projectRoot to get path of active project | |
| process file at path projectRoot & "/src/css/style.css" | |
| end tell |
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 | |
| // This is used as a fallback if the file isn't found for some reason | |
| global $wp_version; | |
| /* | |
| Note: | |
| This function assumes you're only asking for files in your own theme | |
| and that theme isn't a child theme. If you're using a child theme, | |
| replace get_template_directory() with get_stylesheet_directory(). | |
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 getYouTubeIdByUrl(url) { | |
| var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/, | |
| match = url.match(regExp), | |
| result = false; | |
| if( match && match[2].length == 11 ) { | |
| result = match[2]; | |
| } | |
| return result; |
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
| // Inspired by @desandro's debounce.js https://gist.github.com/desandro/8559356 | |
| // Inspired by @ChrisFerdinandi's article: https://gomakethings.com/debouncing-events-with-requestanimationframe-for-better-performance/ | |
| function debounce( fn ) { | |
| var timeout; | |
| return function debounced() { | |
| var _this = this, | |
| args = arguments; | |
| // If there's a timer, cancel it |
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($) { | |
| $(document).ready(function() { | |
| // Call doc ready functions here | |
| }); | |
| // Add additional listeners as needed | |
| // Define functions below | |
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 getSiblings($element) { | |
| var siblings = [], | |
| $sibling = $element.parentNode.firstElementChild; | |
| while( $sibling ) { | |
| // Make sure the sibling isn't the $element being referenced | |
| if( $sibling !== $element ) { | |
| // Add sibling to array | |
| siblings.push($sibling); | |
| } |
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 | |
| // Enqueue Thickbox Assets | |
| add_thickbox(); | |
| // Define shortcodes | |
| // Setup array | |
| $shortcodes = array(); | |
| // Add a shortcode to the shortcodes 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
| {% macro transition(value) -%} | |
| -webkit-transition: {{ value }}; | |
| -o-transition: {{ value }}; | |
| transition: {{ value }}; | |
| {%- endmacro %} | |
| {% macro transform(value) -%} | |
| -webkit-transform: {{ value }}; | |
| -ms-transform: {{ value }}; | |
| transform: {{ value }}; |
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 disable_wp_emoji() { | |
| // all actions related to emojis | |
| remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
| remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
| remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
| remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
| remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); |