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
<!-- wp:heading {"level":1} --> | |
<h1>This is a heading (H1)</h1> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h2>This is a heading (H2)</h2> | |
<!-- /wp:heading --> | |
<!-- wp:heading {"level":3} --> | |
<h3>This is a heading (H3)</h3> |
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 | |
/** | |
* Clears entire WP Engine cache | |
* @return void | |
*/ | |
public function wpeCacheFlush() { | |
// Only initiates a cache clear if the $cleared property is false | |
if (!self::$cleared) { |
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 | |
namespace To4Framework; | |
if (!defined('ABSPATH')) { | |
exit; | |
} | |
class CachingAds extends Caching | |
{ |
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 | |
namespace To4Framework; | |
if (!defined('ABSPATH')) { | |
exit; | |
} | |
/** | |
* Wrapper class to display admin and debug.log messages. |
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 | |
namespace Your\Custom\Namespace; | |
/** | |
* Send a custom admin email when a new customer creates a new account. | |
* @param integer $user_id The ID of the user whose data should be retrieved. | |
* @return [type] [description] | |
*/ | |
function customer_registration_email_alert( $user_id ) { |
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($) { | |
// Create custom plugin to handle AJAX queries and to build containers | |
$.fn.displayPost = function() { | |
$(this).click(function(event){ | |
event.preventDefault(); | |
// grabs the id for the target post | |
var post_id = $(this).data("id"); | |
// We'll define the div id for the container here | |
var id = "#" + post_id; |
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 | |
/* | |
Plugin Name: Sketchbook Plugin | |
Plugin URI: http://takahironoguchi.com | |
Description: A custom tumblr style wall plugin. Requires installation of Elliot Condon's ACF plugin: www.advancedcustomfields.com. And uses sy4mil's Aqua-Resizer https://github.com/sy4mil/Aqua-Resizer | |
Version: 1.0 | |
Author: Takahiro Noguchi | |
Author URI: http://takahironoguchi.com/ | |
License: GPLv2 | |
License: GPLv2 or later |
NewerOlder