Skip to content

Instantly share code, notes, and snippets.

Felix Arntz felixarntz

View GitHub Profile
View site-kit-fix-opcache-call-temporary.php
<?php
/**
* Temporary fix Site Kit opcache_reset call, in case the function is not defined.
*
* @author Felix Arntz, Google
* @license Apache 2.0
* @copyright 2020 Google Inc.
*
* @wordpress-plugin
* Plugin Name: Site Kit Fix Opcache Call (temporary)
@felixarntz
felixarntz / clear-opcache-simple.php
Last active Jan 21, 2020
Clears PHP OpCache when visiting the Plugins admin screen (wp-admin/plugins.php).
View clear-opcache-simple.php
<?php
/**
* Clear OpCache Simple.
*
* @author Felix Arntz, Google
* @license Apache 2.0
* @copyright 2020 Google Inc.
*
* @wordpress-plugin
* Plugin Name: Clear OpCache Simple
View twentytwenty-customizer-style.css
.color-accent,.color-accent-hover:hover,.color-accent-hover:focus,.has-accent-color,.has-drop-cap:not(:focus):first-letter,.wp-block-button.is-style-outline,a { color: #c13030; }blockquote,.border-color-accent,.border-color-accent-hover:hover,.border-color-accent-hover:focus { border-color: #c13030; }button:not(.toggle),.button,.faux-button,.wp-block-button__link,.wp-block-file__button,input[type="button"],input[type="reset"],input[type="submit"] { background: #c13030; }.bg-accent,.bg-accent-hover:hover,.bg-accent-hover:focus,.has-accent-background-color,.comment-reply-link,.edit-comment-link { background-color: #c13030; }.fill-children-accent,.fill-children-accent * { fill: #c13030; }button,.button,.faux-button,.wp-block-button__link,.wp-block-file__button,input[type="button"],input[type="reset"],input[type="submit"],.comment-reply-link,.edit-comment-link { color: #ffe8e8; } { background: #ffe8e8; }body,.entry-title a { color: #000000; }cite,figcaption,.wp-caption-text,.post-meta,.entry-content .wp-block-arc
View twentynineteen-customizer-style.css
/*
* Set background for:
* - featured image :before
* - featured image :before
* - post thumbmail :before
* - post thumbmail :before
* - Submenu
* - Sticky Post
* - buttons
* - WP Block Button
@felixarntz
felixarntz / google-site-kit-track-comments.php
Last active Nov 21, 2019
WordPress mini plugin as an extension to Site Kit that tracks WordPress comment form submissions via Google Analytics.
View google-site-kit-track-comments.php
<?php
/**
* Site Kit by Google Track Comments plugin file.
*
* @package Google\Site_Kit_Track_Comments
* @author Felix Arntz, Google
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
*
* @wordpress-plugin
@felixarntz
felixarntz / google-site-kit-anonymize-ips.php
Last active May 1, 2020
WordPress mini plugin as an extension to Site Kit that ensures the inserted Google Analytics snippet anonymizes IP addresses.
View google-site-kit-anonymize-ips.php
<?php
/**
* Site Kit by Google Anonymize IPs plugin file.
*
* @package Google\Site_Kit_Anomyize_IPs
* @author Felix Arntz, Google
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
*
* @wordpress-plugin
@felixarntz
felixarntz / amp-image-lightbox-links.php
Created Aug 12, 2019
WordPress mini plugin for AMP that transforms all images linking to themselves to open in an `amp-image-lightbox` overlaying the website content. For docs on the component, see https://amp.dev/documentation/components/amp-image-lightbox/
View amp-image-lightbox-links.php
View wp-plugin-mu-loader.php
<?php
/**
* Plugin initialization file
*
* @package WP_Plugin_MU_Loader
* @since 1.0.0
*
* @wordpress-plugin
* Plugin Name: WP Plugin MU Loader
* Plugin URI: https://gist.github.com/felixarntz/daff4006112b60dfea677ca08fc0b31c
@felixarntz
felixarntz / wp-alignment-classes.css
Created Nov 24, 2017
New WordPress alignment classes introduced by Gutenberg
View wp-alignment-classes.css
/* -------------------------------------------------------------
# Variables
------------------------------------------------------------- */
$site_maxwidth: 72rem; // Maximum width the entire site should not exceed
$site_maxwidth-text: 40rem; // Maximum width the main content text should not exceed
$spacing_horizontal: 1rem; // General horizontal padding
/* -------------------------------------------------------------
# General Styles
@felixarntz
felixarntz / edd-no-default-gateway.php
Last active Jan 22, 2018
Mini plugin to allow specifying no default gateway in Easy Digital Downloads.
View edd-no-default-gateway.php
<?php
/**
* Mini plugin to allow specifying no default gateway in Easy Digital Downloads.
*
* @package EDDNoDefaultGateway
* @since 1.0.0
*
* @wordpress-plugin
* Plugin Name: EDD No Default Gateway
* Plugin URI: https://gist.github.com/felixarntz/f9ada0ffb92d6b2e880c7dd0f826b486
You can’t perform that action at this time.