Skip to content

Instantly share code, notes, and snippets.

View YourMark's full-sized avatar

Mark Jansen YourMark

View GitHub Profile
@nielsvr
nielsvr / functions.php
Last active November 16, 2018 10:15
Enqueue styles in Gutenberg only if the blocks are used on the post/page
<?php
add_action('enqueue_block_assets', 'maybe_enqueue_scripts_and_styles' );
function maybe_enqueue_scripts_and_styles() {
// Map blockname with CSS filename
$styles = array(
"basic" => "basic"
);
@jrfnl
jrfnl / wp-config-debug.php
Last active April 5, 2024 18:16
Code to add to wp-config.php to enhance information available for debugging.
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*