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 | |
add_filter('oembed_result', 'youtubeEmbedNocookieFilter', 10, 3); | |
function youtubeEmbedNocookieFilter(string $data, string $url, array $args) | |
{ | |
return str_replace('src="https://www.youtube.com/embed', 'src="https://www.youtube-nocookie.com/embed', $data); | |
} |
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: Spam Pixel | |
* Description: This simple plugin integrates Ross's spam pixel idea with WP Forms | |
* Author: Ross Wintle | |
* Author URI: https://rosswintle.uk | |
* Text Domain: spam-pixel | |
* Domain Path: /languages | |
* Version: 0.1.0 | |
* |
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 | |
/* | |
* Input: files matching src/pages/*.html | |
* Output: public/*.html | |
* | |
* Pages can extend a template by calling: | |
* | |
* extend(string $relativeTemplatePath, array $variables) | |
* | |
* at the start and: |
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 | |
/* | |
* Add a generic post meta filter that allows you to create filters like | |
* get_post_metadata_{$key} | |
*/ | |
add_filter('get_post_metadata', 'generic _meta_filter', 100, 5); | |
function generic_meta_filter($value, $object_id, $meta_key, $single, $meta_type) { | |
remove_filter('get_post_metadata' 'generic_meta_filter', 100, 5); |
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
/** | |
* @returns {string} | |
*/ | |
function getApiKey() { | |
return '<YOUR_API_KEY>'; | |
} | |
/** | |
* @returns {Promise} | |
*/ |
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
// ==UserScript== | |
// @name Feedbin: Keep selected centered | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Keeps the selected item vertically centered in Feedbin | |
// @author Ross Wintle | |
// @match https://feedbin.com/ | |
// @icon https://www.google.com/s2/favicons?domain=feedbin.com | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name WordPress Full Screen Editor killer | |
// @namespace http://rosswintle.uk/ | |
// @version 0.1 | |
// @description Auto-removes the full screen editor on WordPress sites | |
// @author Ross Wintle | |
// @match https://*/* | |
// @match http://*/* | |
// @grant none | |
// ==/UserScript== |
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
{ | |
"name": "your_organisation_or_name/your_project_name", | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "https://wpackagist.org", | |
"only": [ | |
"wpackagist-plugin/*", | |
"wpackagist-theme/*" | |
] |
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
#!/bin/bash | |
## | |
## This script watches for changes in the specified directories and runs the build | |
## script when changes are detected. | |
## | |
## It writes a .modified_time file to the root of the project. This contains the | |
## timestamp of the last modification time. | |
## | |
## This is intended to be used with a front-end script that polls for changes |