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_action( | |
'plugins_loaded', | |
function() { | |
// Utility function that returns a measuring callback for an action hook, | |
// which should be registered as a metric within the action as early as possible | |
// (see PHP_INT_MIN usage below). | |
$get_measure_action_callback = function( $action_hook ) { | |
return function( $metric ) use ( $action_hook ) { | |
$metric->measure_before(); |
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_action( | |
'perflab_server_timing_init', | |
function( $server_timing ) { | |
// Utility function that returns a measuring callback for an action hook. | |
$measure_action = function( $action ) { | |
return function ( $metric ) use ( $action ) { | |
$start_time = null; | |
// If action is already running, at least measure the remainder. |
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 initialization file | |
* | |
* @wordpress-plugin | |
* Plugin Name: Lazyload LCP Fix | |
* Plugin URI: https://gist.github.com/felixarntz | |
* Description: Omits the first content image from being lazy-loaded, to improve LCP performance. | |
* Version: 1.0.0 | |
* Author: Felix Arntz, Google |
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 | |
/** | |
* Ensures Site Kit ignores contextual home URL path modifications added by certain multilingual plugins. | |
* | |
* @author Felix Arntz, Google | |
* @license Apache 2.0 | |
* @copyright 2020 Google Inc. | |
* | |
* @wordpress-plugin | |
* Plugin Name: Fix Site Kit Canonical Home URL Multilingual |
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
const { useSelect } = window.googlesitekit.data; | |
const { | |
registerWidget, | |
WIDGET_WIDTHS, | |
} = window.googlesitekit.widgets; | |
function CustomAnalyticsWidget( props ) { | |
const { | |
Widget, | |
WidgetNull, |
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 | |
/** | |
* 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) |
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 | |
/** | |
* Clear OpCache Simple. | |
* | |
* @author Felix Arntz, Google | |
* @license Apache 2.0 | |
* @copyright 2020 Google Inc. | |
* | |
* @wordpress-plugin | |
* Plugin Name: Clear OpCache Simple |
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
.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 |
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
/* | |
* Set background for: | |
* - featured image :before | |
* - featured image :before | |
* - post thumbmail :before | |
* - post thumbmail :before | |
* - Submenu | |
* - Sticky Post | |
* - buttons | |
* - WP Block Button |
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 | |
/** | |
* 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 |