Skip to content

Instantly share code, notes, and snippets.

View ramonfincken's full-sized avatar

Ramon Fincken ramonfincken

View GitHub Profile
@ramonfincken
ramonfincken / css.php
Last active September 13, 2021 11:56
Outputs minified WP Core Block styles css in footer, only the blocks you actually use in the_content()
<?php
/**
* Outputs minified WP Core Block styles css in footer, only the blocks you actually use in the_content()
* Needs wp_deregister_script( 'wp-block-library' );
*
* @author Ramon Fincken, ManagedWPHosting.nl
*
* @param string $block_content
* @param array $parsed_block
* @return string
@ramonfincken
ramonfincken / read.php
Created December 31, 2023 01:27
Read i3d status page
<?php
$url = 'https://status.i3d.net/';
function get_page_as_string( $url ) {
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_VERBOSE, 0 );
curl_setopt( $ch, CURLOPT_HEADER, 0 );
/// No like, just literal
$nl = [
'_transient_wpassetcleanup_assets_info',
'_transient_wc_attribute_taxonomies',
'_transient_dirsize_cache',
'asp_updates',
'Avada_backups',
'aviaAsset_css_filecontent',
'aviaAsset_js_filecontent',
'apmm_font_family',