Skip to content

Instantly share code, notes, and snippets.

Avatar

Shane Bishop nosilver4u

View GitHub Profile
View easyio-allow-ajax.php
<?php
/*
Plugin Name: Easy IO Allow AJAX
Version: 1.0.0
*/
// Overrides for admin-ajax images.
add_filter( 'exactdn_admin_allow_image_downsize', 'easyio_allow_admin_ajax_images', 10, 2 );
add_filter( 'exactdn_admin_allow_image_srcset', 'easyio_allow_admin_ajax_images', 10, 2 );
add_filter( 'exactdn_admin_allow_plugin_url', 'easyio_allow_admin_ajax_images', 10, 2 );
@nosilver4u
nosilver4u / swis-prehint-exclusions.php
Created Jun 14, 2022
SWIS Exclude Domain(s) from Prefetch/Preconnect
View swis-prehint-exclusions.php
<?php
/*
Plugin Name: SWIS Pre-Hint Exclusions
Version: 1.0.0
*/
// This example uses the same function for both hooks.
add_filter( 'swis_skip_preconnect', 'my_swis_prehint_exclusions', 10, 2 );
add_filter( 'swis_skip_prefetch', 'my_swis_prehint_exclusions', 10, 2 );
function my_swis_prehint_exclusions( $skip, $domain ) {
@nosilver4u
nosilver4u / ewwwio-adjust-sharpening.php
Last active Apr 8, 2022
EWWW IO adjust Sharpening functions/params.
View ewwwio-adjust-sharpening.php
<?php
/*
Plugin Name: EWWW IO Adjust Sharpening
Version: 1.0.0
*/
/*
* Valid options:
* 'FILTER_POINT',
* 'FILTER_BOX',
@nosilver4u
nosilver4u / easyio-skip-feeds.php
Last active Mar 10, 2022
Prevent Easy IO from parsing RSS feed
View easyio-skip-feeds.php
<?php
/*
Plugin Name: Easy IO Feed Bypass
Version: 1.0.0
*/
add_filter( 'exactdn_skip_page', 'easyio_feed_bypass', 10, 2 );
function easyio_feed_bypass( $bypass, $uri ) {
if ( false !== strpos( $uri, '/feed/' ) ) {
return true;
@nosilver4u
nosilver4u / easyio-skip-gif-resizing.php
Created Feb 16, 2022
Prevent resizing of GIF images by Easy IO
View easyio-skip-gif-resizing.php
<?php
/*
Plugin Name: Easy IO GIF Skipper
Version: 1.0.0
*/
add_filter( 'exactdn_pre_args', 'easyio_skip_gif_resizing', 10, 2 );
function easyio_skip_gif_resizing( $args, $image_url ) {
if ( strpos( $image_url, '.gif' ) ) {
return array();
@nosilver4u
nosilver4u / swis-critical-css-api-override.php
Last active Jan 4, 2022
Force the inclusion of CSS for certain elements within the Critical CSS function of SWIS Performance
View swis-critical-css-api-override.php
<?php
/*
Plugin Name: SWIS Critical CSS Override
Version: 1.0.0
*/
add_filter( 'swis_generate_css_post_fields', 'swis_ccss_override_post_fields' );
function swis_ccss_override_post_fields( $fields ) {
if ( is_array( $fields ) ) {
$fields['forceInclude'] = array(