Skip to content

Instantly share code, notes, and snippets.

@mica-sirup
mica-sirup / equal_height_fit-rows.js
Last active October 15, 2025 04:24
isotope equal height fitRows – Isotope Fit Rows with equal height rows
( function( window ) {
'use strict';
function fitRowsDefinition( LayoutMode ) {
var FitRows = LayoutMode.create('fitRows');
FitRows.prototype._resetLayout = function() {
this.x = 0;
@mica-sirup
mica-sirup / function.php
Created July 14, 2023 06:55
Hook and change burger svg icon in the wp navigation block
<?php
function custom_burger_svg_icon_render_block_core_navigation (string $block_content, array $block){
if ($block['blockName'] === 'core/navigation' && !is_admin() && !wp_is_json_request()) {
// replace $svg content with your burger icon > this one was made by ngamlerdlek.design https://thenounproject.com/icon/burger-1126774/
$svg='<svg id="burger" xmlns="http://www.w3.org/2000/svg" with="64" height="64" viewBox="0 0 128 128"><path d="M11.81 88.57c0 8.08 5.68 14.62 12.56 14.62h80.15c6.88 0 12.56-6.54 12.56-14.62v-2.92H11.81v2.92Zm52.63-64.15c-29.06 0-52.63 19.44-52.63 43.17h105.25c-.17-23.91-23.56-43.17-52.62-43.17Zm55.03 47.64H9.23c-2.4 0-4.47 2.06-4.47 4.47S6.82 81 9.23 81h110.24c2.4 0 4.47-2.06 4.47-4.47 0-2.41-1.89-4.47-4.47-4.47Z"/></svg>';
// Replace the existing burger icons 3 lines burger (you have to change the 2 lines to 3 lines icon in wp-nav block) in the block content with the custom SVG
return preg_replace('/\<svg width="24" height="24" xmlns="http:\/\/www.w3.org\/2000\/s
@mica-sirup
mica-sirup / readme.md
Last active May 3, 2022 08:06
WPML différent domaine pour chaque langue

WPML différent domaine pour chaque langue

  1. Dans les zone DNS enlever les 3w sur record dns A / AAAA sans les www
  2. Dans les zone DNS Ajouter un CNAME www qui pointe vers le domaine le domaine principal
  3. Dans Dashboard WP -> WPML Valider le nom de domaine
  4. editer le .htaccess de la racine pour allow cross origin (css/js/font)
<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin https://domaine2.com  
    Header set Access-Control-Allow-Credentials true