Skip to content

Instantly share code, notes, and snippets.

View jerclarke's full-sized avatar
🌿

Jer Clarke they/them jerclarke

🌿
View GitHub Profile
@jerclarke
jerclarke / codeception-confirm-page-reload.php
Created March 8, 2024 16:28
Codeception confirm page reloaded helpers
<?php
# Helper methods to add to the acceptance tester class ($I)
/**
* Run this before submitting a form/clicking link when we want to check the page reloaded later
*
* Sets a JS var that we can check later to know that the page
* has reloaded
*
@jerclarke
jerclarke / gv-about-widget-for-lingua.html
Last active January 19, 2024 20:53
"About GV" widget code for Lingua sites
[gv_promo_card large=1 aspect_ratio='' image_url='https://globalvoices.org/wp-content/uploads/2023/03/gv-inverted-earths-800x450.png' image_alt_text='Alt text' image_link_url='/about/']
<h3>We are Global Voices</h3>
<big> Global Voices is an international, multilingual community of writers, translators, and human rights activists. Together, we leverage the power of the internet to tell stories that build understanding across borders.</big>
<big><a href="/about/">Learn more »</a></big>[/gv_promo_card]
Array
(
[client_id] =>
[client_secret] =>
[access_front] => Array
(
[0] => administrator
)
[access_back] => Array
@jerclarke
jerclarke / aiwp-jer-query-demo.php
Created May 23, 2023 19:15
AIWP Jer's Query Demo - Simple demo of Jer's custom queries using AIWP internals
<?php
/**
* Plugin Name: AIWP Jer's Query Demo
* Plugin URI: https://jerclarke.org
* Description: Simple demo of Jer's custom queries using AIWP internals
* Author: Jer Clarke
* Version: 0.1
* Author URI: https://jerclarke.org
* Text Domain: jer-aiwp-queriess
* Domain Path: /languages
@jerclarke
jerclarke / aiwp-jer-second-amp-tracker-plugin.php
Created December 10, 2022 00:13
A simple demo wp plugin to show how I add a second AMP tracker to AIWP
<?php
/**
* Plugin Name: AIWP Jer's Filter Demo
* Plugin URI: https://jerclarke.org
* Description: Simple demo of Jer's filters for AIWP
* Author: Jer Clarke
* Version: 0.1
* Author URI: https://jerclarke.org
* Text Domain: jer-demo
* Domain Path: /languages
{
"bundleId" : "com.knollsoft.Hookshot",
"defaults" : {
"allowAnyShortcut" : {
"bool" : false
},
"almostMaximizeHeight" : {
"float" : 0
},
"almostMaximizeWidth" : {
@jerclarke
jerclarke / gv_temporary_sc_draft_post_template.html
Last active December 1, 2021 22:52
GV Temporary SC Draft Post Template
<em>Read the guide for instructions: <a href="https://bit.ly/gv-special-categories-temp-guide">Temporary Special Category Guide</a></em>
<strong>DO NOT PUBLISH THIS!!!</strong>
Link to special category: ADD LINK HERE FOR CONVENIENCE
Full size featured image URL: ADD FEATURED IMAGE URL
<em>This URL above should be the largest version of the featured image available. Get the URL by opening the image in the <strong>Add Media</strong> browser, and copying the URL from the <strong>Copy Link</strong> field. Translators should use this URL to download the image, then re-upload it into the category edit screen as the term's <strong>Featured Image</strong>.</em>
<h3>Shortcode for widget in <a href="/wp-admin/widgets.php">Featured Posts Sidebar</a></h3>
[gv_term_promo term="" taxonomy="gv_special"]
@jerclarke
jerclarke / developer.wordpress.org DARK MODE CSS
Created November 4, 2020 00:12
Quick and dirty dark mode CSS for WordPress Developer Handbook. Use with the Stylus browser extension. Probably full of problems but works on the pages I've tried it on.
@-moz-document domain("developer.wordpress.org") {
/*Find this on Github Gist: https://gist.github.com/jerclarke/4aad7b92636baec4aae461f2f5820b1a*/
body,
.single-handbook #primary,
.single-handbook #page {
background: #fff;
background: #232323;
@jerclarke
jerclarke / readthedocs.io CSS DARK THEME
Last active October 30, 2023 15:28
Quick and dirty CSS dark theme for readthedocs.io and the Stylus browser extension.
@-moz-document regexp("https?:\\/\\/([a-z0-9][a-z0-9-]+[a-z0-9]\\.readthedocs\\.io)(\\S+)") {
@media (prefers-color-scheme: dark) {
/*Syntax Highlighting*/
.rst-content pre.literal-block, .rst-content div[class^='highlight'] {
border-color: transparent;
}
pre {
background-color: #191919 !important;
font-weight: bold;
font-family: "JetBrains Mono", monospace;
@jerclarke
jerclarke / acf-advancedcustomfields.com DARK MODE
Created October 23, 2020 14:42
Quick and Dirty Dark Mode for advancedcustomfields.com ACF WordPress plugin homepage
@-moz-document domain("advancedcustomfields.com") {
body, #wrap {background: #333; color: #fff;}
#sidebar:after,
#wrap pre[class*=language-]{background: #222; border-color: #111;}
.links-list>li {
border-color: #999;
}