View composer.json
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/*" | |
] |
View wp-full-screen-editor-killer.user.js
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== |
View feedbin-center.js
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== |
View fathom-scriptable-widget.js
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} | |
*/ |
View get_post_meta_filter.php
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); |
View build.php
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: |
View spam-pixel.php
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 | |
* |
View functions.php
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); | |
} |
View .bashrc-searches
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
# Add these to your .bashrc file for some quick and clever recursive web-dev code searching | |
# from the command line/terminal. | |
# | |
# Should be easy enough to add your own too. | |
# | |
# Usage is just: | |
# | |
# phprgrep <regular expression> | |
# | |
# Regular expresssions need to be escaped/quoted if you're being clever. |
NewerOlder