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 custom_quote_rewrite_rule() { | |
add_rewrite_rule( | |
'^quote/([^/]+)/?$', | |
'index.php?pagename=quote"e_ticker=$matches[1]', | |
'top' | |
); | |
} | |
add_action('init', 'custom_quote_rewrite_rule'); | |
function custom_quote_query_vars($vars) { |
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 | |
/* | |
Plugin Name: Basic Contact Form | |
Plugin URI: https://kevinleary.net | |
Description: A simple contact form plugin that sends email submissions using wp_mail(). | |
Version: 1.0 | |
Author: kevinlearynet | |
Author URI: https://kevinleary.net | |
*/ |
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 | |
/** | |
* FW Connector Config | |
* | |
* Add this to: /wordpress/wp-content/mu-plugins/fw-config.php | |
*/ | |
$host = $_SERVER['SERVER_NAME']; | |
$api_host = ($host === 'student.student-1.com') ? 'https://www17.student-1.com' : 'https://www46.student-1.com'; | |
if (!defined('FW_ENV')) { |
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
Analytics.Client.Identify("{UserID}", new Traits() { | |
{ "id", "{UserID}" }, | |
{ "firstName", "Kevin" }, | |
{ "lastName", "Leary" }, | |
{ "email", "info@kevinleary.net" }, | |
{ "age", 35 }, | |
{ "birthday", "1986-04-22" }, | |
{ "createdAt", "YYYY-MM-DD" }, // Date of initial "application sent" | |
{ "gender", "Male" }, | |
{ "phone", "7814896630" }, |
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(){ | |
/** | |
* Create a new MediaLibraryTaxonomyFilter we later will instantiate | |
*/ | |
var MediaLibraryTaxonomyFilter = wp.media.view.AttachmentFilters.extend({ | |
id: 'media-attachment-taxonomy-filter', | |
createFilters: function() { | |
var filters = {}; | |
// Formats the 'terms' we've included via wp_localize_script() |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Error Loading Site | 502 Bad Gateway</title> | |
</head> | |
<body> | |
<style> | |
@import url(//fonts.googleapis.com/css?family=Open+Sans:300); | |
body { | |
color: #343434; |
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
{ | |
"role": "banner_advertisement", | |
"anchor": "https://www.tripadvisor.com/", | |
"animation": "fade_in", | |
"bannerType": "standard", | |
"identifier": "tripadvisor-cta", | |
"style": { | |
"backgroundColor": "#ffffff", | |
"border": { | |
"all": { |
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
// Save PDF from HTML Microservice | |
https://addaptive-microservices.herokuapp.com/api/html-to-pdf | |
const puppeteer = require('puppeteer'); | |
class Webpage { | |
static async generatePDF(html) { | |
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode. | |
const page = await browser.newPage(); | |
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
{ | |
"itunes_app": "https://itunes.apple.com/us/app/tripadvisor-hotels-flights/id284876795?mt=8", | |
"google_play_app": "https://play.google.com/store/apps/details?id=com.tripadvisor.tripadvisor&hl=en_uk", | |
"twitter_handle": "tripadvisoruk", | |
"facebook_link": "https://www.facebook.com/TripAdvisor", | |
"img_tripadvisor_blog": "tripadvisor-blog.svg", | |
"img_tripadvisor_tagline": "tripadvisor-tagline.svg", | |
"hotels": "Hotels", | |
"flights": "Flights", | |
"rentals": "Rentals", |
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
blockquote p { | |
... | |
&:before { | |
content: "\201C"; | |
text-indent: -.65em; | |
display: inline-block; | |
} | |
&:after { |
NewerOlder