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 | |
/** | |
* Retrieves ID from Youtube URL | |
* @param [type] $url The full youtube URL | |
* @return [type] Just the ID | |
*/ | |
function get_youtube_id_from_url($url) { | |
$parts = parse_url($url); |
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
/** | |
* Icon Selector | |
*/ | |
.acf-field.icon-selector .acf-radio-list > li { | |
padding: 0.25rem 0; | |
margin-right: 0.5rem; | |
} | |
.acf-field.icon-selector li > label { |
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
<?xml version='1.0' encoding='utf-8'?> | |
<widget id="com.machine.myApp" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"> | |
<name>myApp</name> | |
<description> | |
myApp | |
</description> | |
<author email="[email protected]" href="https://www.machine-agency.com"> | |
Machine | |
</author> | |
<content src="index.html" /> |
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 | |
$link_type = get_sub_field('link_type'); | |
if( $link_type && $link_type != 'none' ) : | |
$link_target = ( $link_type == 'external' || $link_type == 'file' ) ? ' target="_blank"' : ''; | |
$link_text = get_sub_field('link_text'); | |
$link_url = get_sub_field('link'); | |
if( $link_type == 'internal' ) { | |
$link_text = empty( $link_text ) ? get_the_title( $link_url ) : $link_text; | |
$link_url = get_permalink( $link_url ); |
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
// Get height of window and set an offset from bottom | |
var winHeight = $(window).height(); | |
var offset = 50; | |
// Recalc height of window in case of resize | |
$(window).bind('resizeEnd', function() { | |
winHeight = $(window).height(); | |
}); | |
// When we scroll we do some checks... |
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
.someselector[id]::before { | |
display: block; | |
content: ""; | |
width: 1px; | |
visibility: hidden; | |
pointer-events: none; | |
/* Set both heights to the same, adjust as needed */ | |
height: 11rem; | |
margin-top: -11rem; |
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 | |
/** | |
* machine-pmpro.php | |
* A dedicated function file for Paid Memberships Pro functionality | |
* | |
* @package WordPress | |
* @subpackage Machine | |
*/ | |
$options = (object) array( |
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 | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
?> |
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
/*! | |
* jQuery.modal.js | |
* | |
* Creates a modal to use with images | |
* | |
* @author Robin Bastien <[email protected]> | |
* @version 1.0.1 | |
* | |
* @example | |
* $('.section--gallery').modal(); |
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
jQuery(document).ready(function($) { | |
// Assuming the items we want to square are .film-listing... | |
if( $('.film-listing').length ) { | |
makeItSquare('.film-listing'); | |
// This handles resizing and preserving the nice squareness | |
$(window).bind('resizeEnd', function() { | |
makeItSquare('.film-listing'); | |
}); |
NewerOlder