Skip to content

Instantly share code, notes, and snippets.

View adam-laita's full-sized avatar

Adam Laita adam-laita

View GitHub Profile
@adam-laita
adam-laita / laita-bricks-typography.php
Last active May 27, 2023 23:25
Adds support for Czech typography plugins for Bricks builder.
<?php
/**
* Plugin Name: Bricks Typography
* Description: Adds support for Czech typography plugins for Bricks builder.
* Plugin URI: https://gist.github.com/adam-laita/01c088b986dac578ec0839d52bdbb8a5
* Author: Adam Laita
* Author URI: https://www.laita.cz
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@adam-laita
adam-laita / blocks.php
Last active January 10, 2020 19:58
WordPress - Gutenberg -> Custom image block (render_block hook)
<?php
// php library Simple HTML DOM Parser https://simplehtmldom.sourceforge.io/ (required)
require_once __DIR__ . '/simple-html-dom.php';
// rewrites core-image block with custom HTML
add_filter( 'render_block', 'my_block_core_image', 10, 2 );
function my_block_core_image( $block_content, $block ) {
// specify image block
@adam-laita
adam-laita / auto_cloudinary_defaults.php
Created August 15, 2019 14:36
WordPress - Auto Cloudinary - Defaults (plugin)
<?php
/*
Plugin Name: Auto Cloudinary - Defaults
Plugin URI: https://gist.github.com/TheALuminium/3f2fa9c773122c63e4de71a92e2196c2
Description: A simple add-on that sets the recommended compression values and format for the Auto Cloudinary plugin.
Version: 1.0
Author: Adam Laita
Author URI: https://www.laita.cz/en
License: GPL2
*/