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 | |
/** | |
* Wordpress RSS Image Enclosure | |
* | |
* Wrap ONLY the featured image inside 'enclosure' tags. | |
* | |
* @author Davey Jacobson | |
* @link https://www.daveyjake.dev | |
* | |
* @package DJ_Dev |
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
/** | |
* Create a Tracker module for Google Analytics | |
* | |
* This tracker enables to track clicks on links and submits on forms. Usually | |
* these events will not be recorded as the window.location is changed and the | |
* request to Google Analytics is cancelled. This module prevents default | |
* behaviour, tracks the Google Analytics event and then continues the link/submit. | |
* | |
* Data attributes are used to augment the event with category/action/label values. | |
* Use them as "data-track-category", "data-track-action" and "data-track-label". |
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 asanaRequest($methodPath, $httpMethod = 'GET', $body = null) | |
{ | |
$apiKey = 'ASANA_API_KEY_HERE'; /// Get it from http://app.asana.com/-/account_api | |
$url = "https://app.asana.com/api/1.0/$methodPath"; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ; | |
curl_setopt($ch, CURLOPT_USERPWD, $apiKey); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
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($) { | |
$.fn.displayPost = function() { | |
event.preventDefault(); | |
var post_id = $(this).data("id"); | |
var id = "#" + post_id; | |
// Check if the reveal modal for the specific post id doesn't already exist by checking for it's length | |
if($(id).length == 0 ) { | |
// We'll add an ID to the new reveal modal; we'll use that same ID to check if it exists in the future. |